techbots
asked on
building mailto: in VBScript ASP
I've done this a dozen times before and it has worked - so I am beating my head against the wall trying to figure out what the problem is and how to fix it.
Here is my code:
Email:
<% Response.Write "<a href='mailto:" & (rsMembersList.Fields.Item ("Email"). Value) & "'>" & (rsMembersList.Fields.Item ("Email"). Value) & "</a>" %>
<br>
Website:
<% Response.Write "<a href='http://" & (rsMembersList.Fields.Item ("Website" ).Value) & "'>" & (rsMembersList.Fields.Item ("Website" ).Value) & "</a>" %>
What shows up in the source code in the browser is this:
Email:
<a href='mailto:jane@doe.org' ></a>
<br>
Website:
<a href='http://www.techbots.com'>www.techbots.com</a>
Why isn't my email address showing up in the browser? It isn't getting plugged in between the "<a href='mailto:jane@doe.org' >" and the "</a>" and I don't know why. Obviously it is reading it in from the database the first time. I have checked my syntax a hundred times and can't for the life of me figure out why this won't work. I even copied and pasted from another website I did with the exact same code - it works on the other website and not this one. (BTW they are hosted on the same server)
Here is my code:
Email:
<% Response.Write "<a href='mailto:" & (rsMembersList.Fields.Item
<br>
Website:
<% Response.Write "<a href='http://" & (rsMembersList.Fields.Item
What shows up in the source code in the browser is this:
Email:
<a href='mailto:jane@doe.org'
<br>
Website:
<a href='http://www.techbots.com'>www.techbots.com</a>
Why isn't my email address showing up in the browser? It isn't getting plugged in between the "<a href='mailto:jane@doe.org'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Joeposter - You found the problem and win the prize!! I had the email field as a memo in the database - and there was another text field after it. I never would have dreamed to check that. I changed it to text and it worked without having to change any coding.
Bravo! Thanks a million.
Debie
Bravo! Thanks a million.
Debie
You could also try this:
%><a href='mailto<%=rsMembersLi