Reply
respose.write a url
Old 09-24-2007, 08:44 PM respose.write a url ~solved
Skilled Talker

Posts: 92
Code:
Response.Write ("<a target=""blank"" href=""")
Response.Write rs("link")
Response.Write ("""><img border=""0"" src=""")
Response.Write rs("image")
Response.Write ("""></a>")
*this is drawing information from a database

link = a link to a website
image = the url of an image

I just can seem to get this to work. This is what it looks like if i do that:
Code:
<a target="blank" href="#http://www.pixeljoint.com/default.asp#"><img border="0" src="#http://pixeljoint.com/pixels/images/pixeljoint6.gif#"></a>
What's with the pound signs?!

Last edited by Skeddles : 09-25-2007 at 07:25 PM.
Skeddles is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 09-24-2007, 08:51 PM Re: respose.write a url
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
Stored in an Access database? It uses funny denote marks, like # around dates, and, apparently, hyperlinks. Either store the URLs in plain text format, or add some code to strip the # marks out. Like:

Response.Write ("href=" + Chr(34) + Replace(link, "#", "") + Chr(34))

The target attribute is _blank, not blank; that might become an issue later.

And Chr(34) returns a quote mark.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 09-24-2007, 09:11 PM Re: respose.write a url
Skilled Talker

Posts: 92
Quote:
Originally Posted by ForrestCroce View Post
Stored in an Access database? It uses funny denote marks, like # around dates, and, apparently, hyperlinks. Either store the URLs in plain text format, or add some code to strip the # marks out. Like:

Response.Write ("href=" + Chr(34) + Replace(link, "#", "") + Chr(34))

The target attribute is _blank, not blank; that might become an issue later.

And Chr(34) returns a quote mark.
yessssss thank you thank you thank you thank you thank you!

I just had to change a setting in the database.
Skeddles is offline
Reply With Quote
View Public Profile
 
Old 09-25-2007, 01:14 AM Re: respose.write a url
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Skeddles, if you haven't figured it out (and I suspect you have), this happens when you make a field a hyperlink within Access.

Never use hyperlink for a field, unless the database is exclusively offline. You'll never get it to function the way you want it to.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-27-2007, 03:38 PM Re: respose.write a url
Learning Newbie's Avatar
Moderator

Posts: 5,199
Name: John Alexander
Quote:
Originally Posted by ADAM Web Design View Post
You'll never get it to function the way you want it to.
Plus the whole point to using a database instead of a Excel file is once you've got your data stored, you can query it in new ways to learn things. If you store the URI as text instead of as a hyperlink which is a special field that Access uses to track different bits of data, you'll be able to do more with your data later.
__________________
4 ways to improve the lives of the "bottom billion"

"HEY YOU KIDS GET OFF MY LAWN!" -John McCain
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 09-28-2007, 12:55 PM Re: respose.write a url
Skilled Talker

Posts: 97
Name: Ganesh
Quote:
Originally Posted by Learning Newbie View Post
Plus the whole point to using a database instead of a Excel file is once you've got your data stored, you can query it in new ways to learn things. If you store the URI as text instead of as a hyperlink which is a special field that Access uses to track different bits of data, you'll be able to do more with your data later.

The is very true. If the data comes with #, use the replace command to remove the unwanted character.

In the long term Hyperlink Field could help you.
__________________
Gather. Search. Compare. Save on Hotel and Flight Prices @ www.vtrip.info
sri_gan is offline
Reply With Quote
View Public Profile
 
Old 10-07-2007, 05:42 AM Re: respose.write a url
Novice Talker

Posts: 7
use ' to replace " in the ""
xuzheng is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to respose.write a url
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.17449 seconds with 12 queries