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

Help want to use a variable in a link.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hey,<br>Need help!&nbsp;&nbsp;How can I use a variable in a link.&nbsp;&nbsp;For example, set zip = 70739!&nbsp;&nbsp;Then use zip as part of this link <br>&nbsp;Ht t p ://page.com/(zip).htm !???&nbsp;&nbsp;The variable zip will be different for different people.&nbsp;&nbsp;I will get it from a cookie!
 
Write the link to the page with JavaScript...<br><br>&lt;Script type=&quot;text/javascript&quot;&gt;<br>document.write (&quot;&lt;A HREF='&quot; + zip + &quot;.htm'&gt;Link&lt;/A&gt;)<br>&lt;/Script&gt; <p> Jeff Friestman<br><a href=mailto: > </a><br><a href= View my Brainbench transcript</a><br>Brainbench 'Most Valuable Professional' for ASP<br>
Brainbench 'Most Valuable Professional' for JavaScript<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top