Hi All. I desperately need help with Javascript.
Problem. I have quite an advanced spinner program. It was obtained here:
Javascript Controls - The Spin Control | Switch on the Code
I am trying to get a spinner button (which selects from 6 - 30 [but customizable] numbers to update a variable and then for this variable to update a href link to a bookmark.
What I have so far.
1. SPINNER CODE on web page. NB the javascript code this refers to is not shown
The HREF link:
going to a bookmark here: <a name="8">
AND my spinner function: PLEEZE note that ths is where the wheels come off.
I want the newVal variable in the functon [which containts the current spin number] to be put into a variable and then for the variable to be sent outside the function to "link" in HREF above. i.e. this way the HREF code can place in the #8and it will jump to the bookmark.
NOTE that a variable var link = 8; declared outside the function (globally) works perfectly.
But I simply cannot see how to get access to the newVar variable i.e. current spinner position within this function :
Anyone who knows how to do this will be blessed in my eyes. PS I am also a beginner programmer so may simply be missing a simple boat.
Kind regards
Mark (markjc@mweb.co.za)