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

Link overloading ...

Status
Not open for further replies.

dbeezzz

Technical User
Nov 30, 2005
54
KR
I want the links on my page to be relevant to whatever page I'm using at that minute eg.
Code:
<a href='/demo.php?style=classic&mode=coverletter'>
<a href='/test.php?style=classic&mode=coverletter'>
I just have one template sheet, so I just want to output something like this
Code:
<a href='?style=classic&mode=coverletter'>
... and have the link relevant to demo if I'm on the demo page and test if I'm on the test page. But I want to use the same html for both pages. Is this possible ?
 
You will find that your second code block will do exactly what you want... although I suggest you switch from using single quotes to double quotes:
Code:
<a href="?style=classic&mode=coverletter">
Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top