Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email link from database driven web page

Status
Not open for further replies.

needhelpquick

IS-IT--Management
Jan 17, 2001
12
0
0
GB
Hi there,
I have a problem in that I can't get the email results from a database on to a web page so that the emal address is clickable and loads up the email software just as mailto: does.
One guy gave me this code but it still doesn't work

<%
response.write &quot;<a href=&quot;&quot; & (Recordset1.Fields.Item(&quot;&quot;email&quot;&quot;).Value)&quot; & &quot;>To Email,Click Here</a>&quot;
%>

This seems to me to be a simple thing for Ultradev to do but I just can't work it out.
I really appreciate any help you can give.
Best regards
Richard
 
couple simple things that might be problems: you're missing an inverted comma and you've got the mailto link wrong:
response.write(&quot;<a href=&quot;&quot;mailto:&quot;&quot; & (recordset1.fields.item(&quot;&quot;email&quot;&quot;).Value)&quot; & &quot;> TO email click here </a>&quot;)

I don't know about the db code though, but it doesn't make much sense to me: this &quot;&quot;email&quot;&quot; thing, hm?
 
Thanks for that but the result is still the same. The &quot;TO email click here&quot; text is underlined but the mailto: is blank.
The &quot;&quot;email&quot;&quot; thing is the part that takes the email address from the database and displays it on a web page. I want that to be underlined (linked) so that theuser can click on the email link and it loads up Outlook.
Sounds simple and common to me but I can't get it to work.
Thanks for you insight
Regards
Richard
 
Those all look wrong to me. Try this:

response.write &quot;<a href='mailto:&quot; & recordset1.fields.item(&quot;email&quot;).Value & &quot;'> TO email click here </a>&quot;

If you still get a blank after mailto: then the field in the database is blank.
 
Thanks for your reply.
I found the solution was easier than I was first led to believe -

<a href=&quot;mailto:<%=recordset1.feilds.item(&quot;email&quot;).value%>&quot;><%=recordset1.feilds.item(&quot;email&quot;).value%></a>

I think I was led down the wrong path right from the start.
Thanks again for your time
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top