Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2004, 07:24 AM
Registered User
 
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default hyperlinking from access field

I have an ASP query which calls up fields from an Access database. One of the fields contains the website address associated with the record, all beginning with www. This comes up fine on an ASP page, complete with hyperlink, but the address links to a location on the server, rather than out into the web. Is there something wrong with the bit of code below? Can I force it to ignore the full server file name?

many thanks
Maggie

 For each fldF in objrs.Fields
   If len(fldF.value) > 0 then
If inStr(fldF.Value, "www.") > 0 then
       response.write "<td><a href=" & fldF.value & ">" & fldF.value & "</a></td>"
     Else
     response.write "<td>" & fldF.value & "</td>"
     End if

    Else
    response.write "<td>&nbsp;</td>"
   End if
  next


 
Old February 23rd, 2004, 08:27 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I'm not clear as to the problem, what HTML is produced at the moment and what do you want to be produced?

--

Joe
 
Old February 23rd, 2004, 11:13 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try prefixing your link with 'http://' and see how that works.

response.write "<td><a href='http://" & fldF.value & "'>" & fldF.value & "</a></td>"

 
Old February 26th, 2004, 07:39 AM
Registered User
 
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dave you're a genius, thank you! That works perfectly.

Maggie






Similar Threads
Thread Thread Starter Forum Replies Last Post
hyperlinking to other pages jinxyfeet Dreamweaver (all versions) 1 October 9th, 2005 08:31 AM
can i select an access field umair_rathore Access 1 March 4th, 2005 08:53 AM
MS Access Field Name itHighway Classic ASP Basics 3 February 22nd, 2005 12:25 AM
hyperlinking with password Ray Pinnegar Pro PHP 2 November 10th, 2003 07:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.