Forum Moderators: open
I have displayed the value of "p", which shows the initial assigned value "-1" being assigned correctly but I have tried all kinds of ways to write the function but unable to get the value to change. It would be helpful if there was a way to display from the HEAD tag.
1) Is there a way to display fields in the HEAD tag area? I would like to display what happens there.
2) The script code (simplest version) I have is below, it is my understanding that the <A> (hypertext) event handler includes "onclick". It is difficult to know whether code is being processed and if not if it is due to syntax or that the event is not handled by the method without a way to display variable values within the function.
What I have in the Head tag:
<SCRIPT language="JavaScript">
var p = -1;
var n = -1;
function clicklink ( n )
{
p = n;
}
</script>
In the body tag:
<a href="#Top" onclick="clicklink( -2 );return true">
<span style="text-decoration: none">Return to top</span></a>