Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Active Email hyperlinks
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Active Email hyperlinks

 Post Reply Post Reply Page  12>
Author
gavinp View Drop Down
Newbie
Newbie


Joined: 03 September 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote gavinp Quote  Post ReplyReply Direct Link To This Post Topic: Active Email hyperlinks
    Posted: 03 September 2003 at 2:58am
I need to now the code to add into my "view data page" from my database so that the Email address submitted is hyperlinked so I can click on it and reply.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2003 at 3:28am

you want it a link in the database?

if so i think you change the "field" to be a hyperlink

if your going to get the results from a ASP Page then do this

<a href="<% if left(rs("field"), 7) <> "mailto:" then Response.Write("mailto:") end if
response.write(rs("Field") & """>" & rs("Field") & "</a>") %>

now, this will check to make sure it puts the "mailto:" in the hyper link if its not there, for this id use a text field in the datebase

if this isnt want you want, then give more details on wot you want to do, and i, or sumone else will try to help better

Back to Top
gavinp View Drop Down
Newbie
Newbie


Joined: 03 September 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote gavinp Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2003 at 4:02am

This is the source code on my "view" page that deals with the Email address

<tr>
    <td><strong><font size="2" face="Arial">Email Address</font></strong></td>
    <td colspan="3"><strong><font size="2" face="Arial"><%=rst("email_address")%><a href="mailto:">< a href=rst("email_address")</a></font></strong></td>
  </tr>

I wish to view the Email address hyperlinked so I can click on to reply when viewing the data on the resulting page.

 

Back to Top
gavinp View Drop Down
Newbie
Newbie


Joined: 03 September 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote gavinp Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2003 at 4:04am

Sorry this is the code

<tr>
    <td><strong><font size="2" face="Arial">Email Address</font></strong></td>
    <td colspan="3"><strong><font size="2" face="Arial"><%=rst("email_address")%></font></strong></td>
  </tr>

 

Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2003 at 4:11am

yeah the problem is your not making it a hyper link if this is your code,

change it to this and it should work!

<tr>
    <td><strong><font size="2" face="Arial">Email Address</font></strong></td>
    <td colspan="3"><strong><font size="2" face="Arial">
<%

Response.Write("<a href=""")
if left(rs("field"), 7) <> "mailto:" then
      Response.Write("mailto:")
end if
response.write(rs("Email_Address") & """>" & rs("Email_Address") & "</a>")

%>
</font></strong></td>
  </tr>

this will make it a hyper link as you just forgot to put the HTML tag in

copy the code above and it should work

 

Back to Top
gavinp View Drop Down
Newbie
Newbie


Joined: 03 September 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote gavinp Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2003 at 4:22am
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2003 at 4:30am

yeah sorry i just realised after i posted you dont use "rs"

change the

response.write(rs("Email_Address") & """>" & rs("Email_Address") & "</a>")

to

response.write(rst("Email_Address") & """>" & rst("Email_Address") & "</a>")

now it should work

Back to Top
gavinp View Drop Down
Newbie
Newbie


Joined: 03 September 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote gavinp Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2003 at 4:38am

ok this is the code as it stands now:

<tr>
    <td><strong><font size="2" face="Arial">Email Address</font></strong></td>
    <td colspan="3"><strong><font size="2" face="Arial"><%

Response.Write("<a href=""")
if left(rst("field"), 7) <> "mailto:" then
      Response.Write("mailto:")
end if
response.write(rst("Email_Address") & """>" & rst("Email_Address") & "</a>")

%></font></strong></td>
  </tr>

and now receiving this error:

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/admin/viewagreement.asp, line 28

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.