Forums

ASP

This topic is locked

Form Input + HTML

Posted 13 Jan 2004 23:20:11
1
has voted
13 Jan 2004 23:20:11 Ken Iversen posted:
Hi,
I have a FORM that (when submitted) sends the data to an MS Access database.
One field (email address i nthis case) I want to ad some HTML to the input that the customer puts into the form..
liek &lt;a href="mailto<img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>customer input here)"&gt;(customer input here again)&lt;/a&gt;
So when I pull the data from Access into a .asp page, the data is a LINK..
Any ideas greatly appreciated, or any refernce to books manuals that might cover this..
Cheers, ken

Replies

Replied 14 Jan 2004 15:32:43
14 Jan 2004 15:32:43 Tommy Ready replied:
Well what did you dim your email field as? For this example we'll say

Dim email

email = form.request("email"

then where ever you put that code change it to:
&lt;a href="mailto:" & email & "&gt;" & email & "&lt;/a&gt;

It should look something like that if I'm not mistaking. Try it and if it works let me know!



Dreamweaver MX | Flash 5/MX | Visual Studio 6.0 | Visual Studio .NET
Replied 15 Jan 2004 00:08:38
15 Jan 2004 00:08:38 Ken Iversen replied:
Hi, Smoothy
I solved it by using a set of Dreamweaver MX tools called 'Charon Formatting' this is what the code looks like..

JavaScript in HEAD

&lt;SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT&gt;
function CI_DynamicMailTo(strtext)
on error resume next
CI_DynamicMailTo = "&lt;a href=""mailto:" & strtext & """&gt;" & strtext & "&lt;/a&gt;"
End Function
&lt;/SCRIPT&gt;
This is the form field..

&lt;%= CI_DynamicMailTo((rsAdminBooking.Fields.Item("EmailAddress".Value)) %&gt;

Thanks for your input..

Regards, Ken
Replied 15 Jan 2004 01:12:27
15 Jan 2004 01:12:27 Tommy Ready replied:
no problem....i knew it was somthing like that!<img src=../images/dmxzone/forum/icon_smile_blackeye.gif border=0 align=middle>

Dreamweaver MX | Flash 5/MX | Visual Studio 6.0 | Visual Studio .NET

Reply to this topic