hi,
If we have many functions,& one of the function is called by
"onclick" on a link.Tell me this function,which is called by onclick,
executes with the other functions or executes only by clicking on the link??
The problem I'm faceing is that, firstof all I initilize the global variable "description"
in in the head tag.then that
variable uses in the body tag so for that reason its value changes.
I want to use that new value of global varible in that function which
is called by clicking on the image.but I 'm getting the global value
of the variable.why I'm not getting the changed value of the global
variable. i'm pasteing my code below. Tell me where I have the error
& plz correct the code coz I want to use the new value of the "description"
variable ,but it is showing the old value.
note: the img should be placed before the variable "description"
Is it possible that we can execute any function on "onclick" of the link & how it is poosible?
thanx in advance.
</head>
<body>
<?
echo "
<script language='javascript' >
function mush() { \n";
echo " alert(' Hello $description ');
}
</script>";
?>
<a href="#" onclick=mush()>
<img src="pics/Save.gif" width="30" height="28" border="0"></a>
<?
$description="Second";
?>
</body>