slayerboyjr
02-18-2005, 07:24 PM
Hi,
I'd like to send a variable using a hyperlink to page2.html. I'm not sure how it would look like in code so I thought I'd just write it out.
If anyone can create the code for functional pages, I could work my way through to try to understand how it's done. I really want to learn how to do this.
Thank you.
page1.html
<a href="page2.html?choice=cars">cars</a>
<a href="page2.html?choice=trucks">trucks</a>
page2.html
This would be the JavaScript to display the content based on the variable that was passed from page1.html
If choice=cars
show car content
else if choice=trucks
show truck content
else
show default content
I'd like to send a variable using a hyperlink to page2.html. I'm not sure how it would look like in code so I thought I'd just write it out.
If anyone can create the code for functional pages, I could work my way through to try to understand how it's done. I really want to learn how to do this.
Thank you.
page1.html
<a href="page2.html?choice=cars">cars</a>
<a href="page2.html?choice=trucks">trucks</a>
page2.html
This would be the JavaScript to display the content based on the variable that was passed from page1.html
If choice=cars
show car content
else if choice=trucks
show truck content
else
show default content