Solved

building mailto: in VBScript ASP

Posted on 2004-08-16
3
663 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
Comment Utility
<% 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

8 Experts available now in Live!

Get 1:1 Help Now