|
| |
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
Simple Content Management - 9/18/2002 6:34:53
When using DRW to add and update fields and returning multiple DRW' s on one page I have managed to create a simple Content Management system. Here' s my problem... On the web page the user fills in details in a memo field. To format the text on the DRW I put: <%=replace(FP_FieldVal(fp_rs," frontrightHook" ),chr(10)," <BR>" )%> Now.... If I want the user to be able to put a hyperlink in... How is this possible? Any genius who figures this one out deserves a pint of Kronenbourg! Dave
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Simple Content Management - 9/18/2002 11:36:44
<%=replace(FP_Field(fp_rs," frontrightHook" ),chr(10)," <BR>" )%> Notice I used FP_Field instead of FP_FieldVal.....
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/18/2002 11:52:41
Roger, How would that create a hyperlink in the DRW though?
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Simple Content Management - 9/18/2002 11:56:27
What happens is that when FP sees the FP_FieldVal, it assumes you want to display the text instead of interpreting the text with the browser. When you use FP_Field, it just passes the text directly to the browser. FP_FieldVal will pass < instead of <, etc. whereas FP_Field will not change the contents at all. DOes that make sense???
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/18/2002 12:00:21
Would this work if they wanted to put regular text in but half way through hyperlink a word?
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Simple Content Management - 9/18/2002 12:41:41
Absolutely. They would have to put the full HTML code in. Something like: Blah, blah, and see <a href=" http://www.myDomain.com/mypage.asp" >this</a> for further instructions.
|
|
|
|
no_mac_jack
Posts: 295 From: Washington state, USA Status: offline
|
RE: Simple Content Management - 9/18/2002 20:49:26
Just a note... That also allows the use of *all* other HTML including scripts, formatting, tables, etc...not just the anchor (hyperlink) tag. ~no_mac_jack
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/19/2002 4:13:34
Roger Thanks a bunch!! Next time I am around in the USA I will buy you a pint of lager!!
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Simple Content Management - 9/19/2002 16:50:50
Hi Cookie, I would like to do the same. So, where did you put this linke? <%=replace(FP_FieldVal(fp_rs," frontrightHook" ),chr(10)," <BR>" )%> in the value of memo field? on the form. Thanks Hisham
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/20/2002 6:24:14
I have returned the value using the code above, but there is loads of reurns at the top. When I look at the HTML of the results it shows the following: <html> <BR> <BR><head> <BR><meta http-equiv=" Content-Language" content=" en-gb" > <BR><meta name=" GENERATOR" content=" Microsoft FrontPage 5.0" > <BR><meta name=" ProgId" content=" FrontPage.Editor.Document" > <BR><meta http-equiv=" Content-Type" content=" text/html; charset=windows-1252" > <BR><title>New Page 2</title> <BR></head> <BR> <BR><body> <BR> <BR><p>This is a html test</p> <BR><p>BOLD TEXT</p> <BR><p>ITALIC TEXT</p> <BR><p>UNDERLINE TEXT</p> <BR><p><a href=" sfd" >HYPERLINK 1</a></p> <BR><p><a href=" adasd2" >HYPER LINK 2</a></p> <BR><table border=" 1" cellpadding=" 0" cellspacing=" 0" style=" border-collapse: collapse" bordercolor=" #111111" width=" 100%" id=" AutoNumber1" > <BR> <tr> <BR> <td width=" 25%" >TABLE HEAD 1</td> <BR> <td width=" 25%" >TABLE HEAD 2</td> <BR> <td width=" 25%" >TABLE HEAD 3</td> <BR> <td width=" 25%" >TABLE HEAD 4</td> <BR> </tr> <BR> <tr> <BR> <td width=" 25%" >3264278364</td> <BR> <td width=" 25%" >384234676</td> <BR> <td width=" 25%" >23842364</td> <BR> <td width=" 25%" >8723945656</td> <BR> </tr> <BR></table> <BR> <BR></body> <BR> <BR></html> <BR></td> </tr> Any ideas?
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Simple Content Management - 9/20/2002 6:58:56
Hi cookie, I have a suggestion. All the code above and your field code might or will solve your problem. My point of view is that not all users can or know how to use the <a href=" ...>. It will give them a hard time entering a hyperlink. I' ve seen in some Forums or forms a button on top of the memo field or text area a small text field with a button. If the user would like to insert a hyperlink, he/she can type the hyperlink, simply www.yahoo.com, then presses the button. After that you see the hyperlink in the text area as <a href=" http://www.yahoo.com></a>. If this can be done, it would be much easier for the users. Hi NMJ, Thanks for your reply. Do you mean that I have to put this code on the Insert Query? Suppose the form is directly posting to the Database, where to put this code? Regards Hisham
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/20/2002 7:11:47
Hisham, Just create a memo field and paste html in. Either use a INSERT query or the DB Update in the form properties. And on the DRW page, put it on the spooky diet and, use: <%=replace(FP_FieldVal(fp_rs," fieldname" ),chr(10)," <BR>" )%> to recall it.
< Message edited by cookie -- 9/19/2002 7:49:06 AM >
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Simple Content Management - 9/20/2002 7:19:21
Hi, Thanks cookie, it' s clear now. Hisham
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/21/2002 4:29:39
Still can' t figure out why it' s still putting a <BR> at the beginning of every line?? <html> <BR> <BR><head> <BR><meta http-equiv=" Content-Language" content=" en-gb" > <BR><meta name=" GENERATOR" content=" Microsoft FrontPage 5.0" > <BR><meta name=" ProgId" content=" FrontPage.Editor.Document" > <BR><meta http-equiv=" Content-Type" content=" text/html; charset=windows-1252" > <BR><title>New Page 2</title> <BR></head> <BR> <BR><body> <BR> <BR><p>This is a html test</p> <BR><p>BOLD TEXT</p> <BR><p>ITALIC TEXT</p> <BR><p>UNDERLINE TEXT</p> <BR><p><a href=" sfd" >HYPERLINK 1</a></p> <BR><p><a href=" adasd2" >HYPER LINK 2</a></p> <BR><table border=" 1" cellpadding=" 0" cellspacing=" 0" style=" border-collapse: collapse" bordercolor=" #111111" width=" 100%" id=" AutoNumber1" > <BR> <tr> <BR> <td width=" 25%" >TABLE HEAD 1</td> <BR> <td width=" 25%" >TABLE HEAD 2</td> <BR> <td width=" 25%" >TABLE HEAD 3</td> <BR> <td width=" 25%" >TABLE HEAD 4</td> <BR> </tr> <BR> <tr> <BR> <td width=" 25%" >3264278364</td> <BR> <td width=" 25%" >384234676</td> <BR> <td width=" 25%" >23842364</td> <BR> <td width=" 25%" >8723945656</td> <BR> </tr> <BR></table> <BR> <BR></body> <BR> <BR></html> <BR></td> </tr>
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/21/2002 6:02:11
I Think I have found it! I have replaced: <%=replace(FP_FieldVal(fp_rs," frontrightHook" ),chr(10)," <BR>" )%> With <%=replace(FP_FieldVal(fp_rs," frontrightHook" ),chr(10)," " )%> Removing the <BR>.
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Simple Content Management - 9/21/2002 12:59:47
Hi Cookie, So now, does your memo field display text in addition to hyperlink? Did you find a way to avoid the user typing <a href ....etc>? Like in this forum, you just type http://www.google.com . No need to put the HREF syntax. Regards Hisham
< Message edited by hhammash -- 9/20/2002 1:00:36 PM >
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/24/2002 4:24:00
Hi Hisham, No - I have not managed to find a way to do that yet, BUT the HTML gets inerpreted perfectly in the DRW. If anyone has any ideas to do what Hisham has suggested that would be great!!! Thanks
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Simple Content Management - 9/24/2002 5:13:53
Hi Cookie, Have you noticed here in this forum, when you post a message or a reply and type a URL like www.yahoo.com within your message, that it gets interpreted as a hyperlink. Why don' t you see how is it done here in ASP. Your users can just type the link www.google.com no need for them to put the html format. Regards Hisham
|
|
|
|
Cookie
Posts: 297 Joined: 2/7/2002 From: UK Status: offline
|
RE: Simple Content Management - 9/24/2002 11:57:54
Anyone know?
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|