Jump to content

doubt on values of variables passed to a function


Vidya_tr

Recommended Posts

You can only do this if the php is run prior to your javascript code, you could echo the variable to an input field then retrieve it using javascript.

 

So you could <?php echo '<input type="hidden" name="javavariable" value="'.$yourvariable.'">'; ?>

 

Then in javascript use

myvar = document.getElementById("javavariable").value;

 

Hope this helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.