473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

email to link

I am using this code

<table border="1">
<%
Do While Not rstSimple.EOF
%>
<tr>
<td><%= rstSimple.Fields("username").Value %></td>
<td><%= rstSimple.Fields("password").Value %></td>
<td><%= rstSimple.Fields("email").Value %></td>
</tr>
<%
rstSimple.MoveNext
Loop
%>
</table>

How can I make the email field a hyper link?

Charlie

Jul 19 '05 #1
4 1342
How would you do it if you hard"coded" the HTML?

<td><a href="mailto:pe****@domain.kom">pe****@domain.kom</a></td>

Right? So, substitute the e-mail address for the variable (or recordset
value) that represents the e-mail address. Let's put the value into a
variable to make it simpler and a bit more efficient though.
<%
sEmail = rstSimple.Fields("email").Value
%>

<table border="1">
<%
Do While Not rstSimple.EOF
%>
<tr>
<td><%= rstSimple.Fields("username").Value %></td>
<td><%= rstSimple.Fields("password").Value %></td>
<td><a href="mailto:<%=sEmail%>"><%=sEmail%></a></td>
</tr>
<%
rstSimple.MoveNext
Loop
%>
</table>
Ray at home
"Chas" <rf*@thewebdeziners.com> wrote in message
news:40***************@thewebdeziners.com...
I am using this code

<table border="1">
<%
Do While Not rstSimple.EOF
%>
<tr>
<td><%= rstSimple.Fields("username").Value %></td>
<td><%= rstSimple.Fields("password").Value %></td>
<td><%= rstSimple.Fields("email").Value %></td>
</tr>
<%
rstSimple.MoveNext
Loop
%>
</table>

How can I make the email field a hyper link?

Charlie

Jul 19 '05 #2
Thanks so much this is great!
Charlie

"Ray at <%=sLocation%> [MVP]" wrote:
How would you do it if you hard"coded" the HTML?

<td><a href="mailto:pe****@domain.kom">pe****@domain.kom</a></td>

Right? So, substitute the e-mail address for the variable (or recordset
value) that represents the e-mail address. Let's put the value into a
variable to make it simpler and a bit more efficient though.

<%
sEmail = rstSimple.Fields("email").Value
%>

<table border="1">
<%
Do While Not rstSimple.EOF
%>
<tr>
<td><%= rstSimple.Fields("username").Value %></td>
<td><%= rstSimple.Fields("password").Value %></td>
<td><a href="mailto:<%=sEmail%>"><%=sEmail%></a></td>
</tr>
<%
rstSimple.MoveNext
Loop
%>
</table>

Ray at home

"Chas" <rf*@thewebdeziners.com> wrote in message
news:40***************@thewebdeziners.com...
I am using this code

<table border="1">
<%
Do While Not rstSimple.EOF
%>
<tr>
<td><%= rstSimple.Fields("username").Value %></td>
<td><%= rstSimple.Fields("password").Value %></td>
<td><%= rstSimple.Fields("email").Value %></td>
</tr>
<%
rstSimple.MoveNext
Loop
%>
</table>

How can I make the email field a hyper link?

Charlie


Jul 19 '05 #3
> <%
sEmail = rstSimple.Fields("email").Value
%>

<table border="1">
<%
Do While Not rstSimple.EOF
%>


Well, you probably want to assign the value inside the loop. ;-)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #4
Oh yeah. Good point. :]

Ray at home

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl...
<%
sEmail = rstSimple.Fields("email").Value
%>

<table border="1">
<%
Do While Not rstSimple.EOF
%>


Well, you probably want to assign the value inside the loop. ;-)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Oliver Spiesshofer | last post by:
Hi, is there a script out there that can send RSS feeds to a given email account? I have search the usual suspects (google, SF, FM, hotscripts) but could not find anything thanks Oliver
2
by: Nigo | last post by:
Hi there Is it posible to make a link (to a php-file on a server) in an email that, when you click on it, sends info about who the reciver of the email is? Lets say I send out an email thru...
16
by: Brian Wilson | last post by:
Anyone know how I can add a "?Subject" line to this? <head> <script> var sdomain='brianjenny.net'; var email='webmaster'; var myaddress=(''+email+'@'+sdomain+''); </script>...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
24
by: Arno R | last post by:
Hi all, I have a client with several shoe-shops. Customers can leave their email-address if they want to be notified when there is a sale. Input is validated with instr() I am checking for @...
15
by: tshad | last post by:
I am trying to put an persons email address in a response I am sending another person. I can get it to work by doing the following: message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant:...
1
by: Jeebu | last post by:
hi, let me explain my problem with a scenario. after completing a registration procees of a user ,an email will be sent to the user for confirmation.the email contains a link and when the user...
0
by: comp.lang.php | last post by:
I wrote a method that should check if an email address is valid. In another method I've already checked to see if $_POST exists and is well-formed, so those checks are not necessary in this scope....
9
by: roger.rigsby | last post by:
I have a working email functionality on my site but there's a problem with links. I really want to use the "send this article by email" sort of functionality on my site. But instead of emailing...
4
n8kindt
by: n8kindt | last post by:
ok, i've done quite a bit of research on my problem here. random "! " will appear in my email that i'm sending thru cdo. i've learned that this problem occurs when there are long lines of html (or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.