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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to correctly pass parameters to URLs ? 1

Status
Not open for further replies.

vias

Programmer
Apr 25, 2000
54
GB
Hi,

This is an example:

<A HREF=&quot;sale.asp?ainfo=192&option1=23&option2=&quot; &var1>click here</a>

I have 3 parameters : ainfo,option1 and option2, and am passing a variable 'var1' to option2.

The first two parameters 'ainfo' and 'option1' are passed correctly but the value of 'option2' is not picked up, it is not returning anything.

If I set a fixed value to option2, like :
<A HREF=&quot;sale.asp?ainfo=192&option1=23&option2=43&quot;>click here</a>

it's fine

Am I missing something, or is the syntax wrong?
 
daveJam,

Thanks for your response.

Could you please post your reply again as part
of it is missing.

Thanks.
Viasa
 
well that came out all wrong,

you need to set your variable within ASP before you have the link.

make sure you have speach marks round the total href from start to finish.

<%=var1%> is what you need to put after the = in option2

unfortunately it seems to be giving me a link when i don't want one!
within your first 'a href=&quot;' tab put

after http site and page (although your can get away with just your page name) use ?ainfo=192&option1=23&option2=<%=var1%>

close your speach marks then write your text and close your '/a'

Not sure how to put this kind of code into this without messing it up so i hope this works

daveJam

*Is this where we put the lonely hearts bit*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top