Solved

building mailto: in VBScript ASP

Posted on 2004-08-16
3
778 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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/…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

615 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