Forums

This topic is locked

Displaying entered code.

Posted 07 Aug 2002 04:00:54
1
has voted
07 Aug 2002 04:00:54 Dave Thomas posted:
Lo all <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Continuing with my quest to know all i can about forms and databases my latest question is:
<b>How do i display script/html/asp code which is entered into an Access memo field on the page in it's raw code form?</b>
It's for tutorials but i don't want the info in textarea's, i just want it written in a table or whatever.
Some posts on here do it, but when i try to post any code on here, the form processes the code <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

What gives? and more importantly, whats the solution?

Cheers,
Dave

"Get the kettle on, time for a brew"

Replies

Replied 07 Aug 2002 07:40:53
07 Aug 2002 07:40:53 Dave Clarke replied:
In the data bindings panel, Dave, select the field you want then scroll across and there should be 2 drop-down lists - Binding & Format - in the format one choose HTML Encode and then pop your data where you want it and it should be displayed as HTML.

Dave
Replied 07 Aug 2002 13:23:35
07 Aug 2002 13:23:35 Dave Thomas replied:
mmmmmm, tried that and it still returned the line-break rather than showing me a BR tag.

Will it be something to do with the ENCTYPE?

will try it again to make sure....

"Get the kettle on, time for a brew"

Edited by - UltraDav on 07 Aug 2002 13:24:25

Edited by - UltraDav on 07 Aug 2002 13:56:03
Replied 07 Aug 2002 16:20:23
07 Aug 2002 16:20:23 David Behan replied:
Use a replace function such as:

Replace(rsPageDetails.Fields.Item("PAGE_FULL_TEXT".Value,"&lt;","& lt;"
Replace(rsPageDetails.Fields.Item("PAGE_FULL_TEXT".Value,"&gt;","& gt;"

The "& lt;" should actually be joined together in the above but if I do it here it will come out as "&lt;"

Regards,

Dave


Edited by - beano on 07 Aug 2002 16:22:32
Replied 07 Aug 2002 18:20:55
07 Aug 2002 18:20:55 Dave Thomas replied:
Will them 2 lines cover the entire list of tags Beano?

I appreciate your answer m8, but can you explain a little of what it does.
Will give it a go anyway for now.

Cheers Dave

"Get the kettle on, time for a brew"
Replied 07 Aug 2002 19:43:57
07 Aug 2002 19:43:57 Dave Thomas replied:
Okies <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> got the code to display with the first line of code kindly provided by Beano above.
If i tried to use both lines, it gave me Sub Errors.

Problem now is, same ol' story of the entry being one big line.

So tried to add a VbCrLf, "BR" (with &lt; &gt<img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle> and got a syntax error.

Sure this is an easy answer for one of you out there, but all these dots, ampersnads, quotes and double quotes sometimes get the better of me <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

"Get the kettle on, time for a brew"
Replied 08 Aug 2002 14:17:26
08 Aug 2002 14:17:26 Dave Thomas replied:
Come on chaps, you can't answer the big stuff and leave the little stuff to me. lol

"Get the kettle on, time for a brew"

Edited by - UltraDav on 09 Aug 2002 13:08:36

Reply to this topic