Hi, Im putting together a site and I want to know how to pass a variable across the url that already has a value. The reason for this is that the site is for visually impaired people so it has a selection of four different text sizes. I have a javascript variable called font and I want to pass the value of that around the site through the url when the user presses any href links. This is so that the text stays the size set by the user and doesnt go back to the normal size ie 100%.
I know the code above doesnt work but it is included to help show what i am trying to do. I usually do stuff like this in PHP so am a little unclear how to acheive this using Javascript.
I basically want to make font = the value of font which already has a value.
Any help would be very much appreciated.
Regards
Rob
Code:
<div id="topnav_box"><H2 class="navtextbold">
<div class="topnav_latest_news" align="center"><a href="../latest_news/index.html?font=$font"> Latest News </a></div>
<div id="topnav_spacer"></div>
<div id="topnav_about_us" align="center"> About Us </div>
<div id="topnav_spacer"></div>
<div id="topnav_pals" align="center"> PALS </div>
<div id="topnav_spacer"></div>
<div id="topnav_rec" align="center"> Recruitment </div>
<div id="topnav_spacer"></div>
<div id="topnav_questions" align="center"> Your Questions </div>
<div id="topnav_spacer"></div>
<div id="topnav_patient" align="center"> Patient Information </div>
<div id="topnav_spacer"></div>
<div id="topnav_vis" align="center"> Visitor Information </div></H2>
</div>
I know the code above doesnt work but it is included to help show what i am trying to do. I usually do stuff like this in PHP so am a little unclear how to acheive this using Javascript.
I basically want to make font = the value of font which already has a value.
Any help would be very much appreciated.
Regards
Rob