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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to add Mailto: hyperlink with database field 1

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I am creating a members list and would like to have the members e-mail show as a hyperlink in the Table. So anyone could just click it and their e-mail program would pop up

like this
dposton@myweb.net

here is what I have so far
The e-mail is a field in an Access database

<td width=&quot;200&quot;><a href=&quot;mailto:<%=fp_rs(&quot;E-mail&quot;)%>&quot;></a></td>
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
HI

put it in a loop and work it Unicorn11
unicorn11@mailcity.com

[red]Luck is not chance, it's toil; fortune's expensive
smile is earned.[red]
 
I have it in a loop
I need the syntax
What I have is not correct

<td width=&quot;200&quot;><a href=&quot;mailto:<%=fp_rs(&quot;E-mail&quot;)%>&quot;></a></td>

How do I concatenate the MailTo: and the field information together so it shows on the page as a Mail Hyperlink?

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
response.write &quot;<td><a href=&quot;&quot;mailto:&quot; &_
fp_rs(&quot;E-mail&quot;) &_
&quot;&quot;> &_
fp_rs(&quot;E-mail&quot;) &_
&quot;</a></td>&quot;

(you put the e-mail addres between <a> and </a>)
br
Gerard
 
We are real close
here is what I have now
<td><a href=&quot;mailto:&quot; & <%=fp_rs(&quot;E-mail&quot;)%>> <%=fp_rs(&quot;E-mail&quot;)%></a></td>

It shows a hyperlink and when clicked on, it brings up and e-mail box but it has now TO: information.
Its blank.
This does not work either.
<td><a href=&quot;&quot;mailto:&quot; & <%=fp_rs(&quot;E-mail&quot;)%>&quot;> <%=fp_rs(&quot;E-mail&quot;)%></a></td>
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
This is what you want:
<td><a href=&quot;mailto:a@b.com&quot;>a@b.com</a></td>


so in
<td><a href=&quot;mailto:&quot; & <%=fp_rs(&quot;E-mail&quot;)%>> <%=fp_rs(&quot;E-mail&quot;)%></a></td>

there is a &quot; missing between >>

in
<td><a href=&quot;&quot;mailto:&quot; & <%=fp_rs(&quot;E-mail&quot;)%>&quot;> <%=fp_rs(&quot;E-mail&quot;)%></a></td>

there is a &quot; too much after href
br
Gerard
 
It still does not work
here is the link go have a look for yourself


here is my code
------------------------
<%do while not fp_rs.eof%>

<tr>
<td width=&quot;70&quot;><%=fp_rs(&quot;Salutation&quot;)%></td>
<td width=&quot;92&quot;><%=fp_rs(&quot;FirstName&quot;)%></td>
<td width=&quot;91&quot;><%=fp_rs(&quot;LastName&quot;)%></td>
<td width=&quot;170&quot;><%=fp_rs(&quot;Address&quot;)%></td>
<td width=&quot;80&quot;><%=fp_rs(&quot;City&quot;)%></td>
<td width=&quot;40&quot;><%=fp_rs(&quot;State&quot;)%></td>
<td width=&quot;48&quot;><%=fp_rs(&quot;Zip&quot;)%></td>
<td width=&quot;120&quot;><%=fp_rs(&quot;Phone Home&quot;)%></td>
<td width=&quot;120&quot;><%=fp_rs(&quot;Phone Work&quot;)%></td>
<td width=&quot;120&quot;><%=fp_rs(&quot;Pager&quot;)%></td>
<td width=&quot;120&quot;><%=fp_rs(&quot;FAX&quot;)%></td>
<td><a href=&quot;mailto: & <%=fp_rs(&quot;E-mail&quot;)%>&quot;><%=fp_rs(&quot;E-mail&quot;)%></a></td>
</tr>
<%fp_rs.movenext%>
<%loop%>

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
<a href=&quot;mailto:<%=fp_rs(&quot;E-mail&quot;)%>&quot;><%=fp_rs(&quot;E-mail&quot;)%></a>

Take out the ampersand like I have above -- only use those if you are using a response.write() to write the code to the screen like this:

response.write(&quot;<a href=mailto:&quot;&quot;&quot; & fp_rs(&quot;E-mail&quot;) & &quot;&quot;&quot;>&quot; & fp_rs(&quot;E-mail&quot;) & &quot;</a>&quot;)

Either way should work --

:)
Paul Prewett
penny.gif
penny.gif
 
YES YES YES !!!!

thank you Paul !!!

how 'bout a STAR !!!!! DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Oh, I meant to tell you how I found it -- and how I almost always find my errors like that.

I view the source of the page -- the rendered HTML, once the ASP has executed. When you do that, you would have seen that ampersand in there, and would have taken it out of your statement.

:)
paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top