Solved

building mailto: in VBScript ASP

Posted on 2004-08-16
3
680 Views
Last Modified: 2006-11-17
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)


0
Comment
Question by:techbots
3 Comments
 
LVL 11

Expert Comment

by:thunderchicken
ID: 11812294
<% Response.Write "<a href='mailto:" & rsMembersList.Fields.Item("Email").Value & "'>" & rsMembersList.Fields.Item("Email").Value & "</a>" %>

You could also try this:

%><a href='mailto<%=rsMembersList.Fields.Item("Email").Value%>'><%=rsMembersList.Fields.Item("Email").Value%></a>
0
 
LVL 15

Accepted Solution

by:
joeposter649 earned 125 total points
ID: 11812404
Is there a memo field in the rsMembersList?  If so make sure it's at the end of the rs.
0
 
LVL 1

Author Comment

by:techbots
ID: 11814489
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
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now