I need to have a toggle button where …
JQuery and Php needed here?
If I click it one…the input hidden will be:
// Display this one if $myPhpVar isset
<input type="hidden" name="myHidden" id="myHidden" value="<?php echo $myPhpVar ?>" />
and if I click again:
// Display this one if $myPhpVar is not empty
<input type="hidden" name="myHidden" id="myHidden" value="" />
Hope I’ve explaining properly.
UPDATE: What I want to do is that If $myVar is not empty when I click button X then it will set the value to blank.
Here you go :
and example fiddle : http://jsfiddle.net/8dwNf/1/