Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple link question

Status
Not open for further replies.

cschaffer

IS-IT--Management
Aug 21, 2001
196
CA
THis is a very simple question, I have it all working execpt on aspect of it. I have a hyperlink field in an Access DB. I diplay the link in a asp page. the following is a example of the code I use:

<A HREF=&quot;<%=DInternet%>&quot; target=&quot;top&quot;>click here</A>

now the link in the database is a full url to an out side site. BUt when I click on it it goes to
any ideas h0w to get ride of the first part and treat this like a param!!??

Thanks

Corey
 
Hi. could you be a bit more specific about what you want to do?

bassguy

 
Apparently, DInternet holds that full address, so I hate to state the obvious, but that value has to be coming out of your database, yes?

So wherever you're pulling it from is the culprit...

If you just want to split out the last part of the url, then you could do this:

dim myArray, url
myArray = split(DInternet,&quot;?&quot;)
url = myArray(ubound(myArray))

then just use the variable, url to stick in your href, but that's assuming there will only be the one ? in your string.... best to get the raw string from somewhere than relying on there being no exceptions.

hope that helps! :)
paul
penny.gif
penny.gif
 
change the field type in access from hyperlink to text. that's why it's coming in that format.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top