I am looking for a way to change the value what I passed to function once a button is pressed
<span id="showHidden" style=" margin-left:726px; position:relative; top:40;">
<input type="image" id="btnShowHidden" src/images/hide.gif" onclick="showHiddenRecords(1);" />
</span>
As you see in showHiddenRecords, its passing a value of 1. What I want is to toggle these value every time a user clicks the image. so if its one it will change to zero and if its zero it will chnage back to one. Is this possible? how?
e.g;
showHiddenRecords(1)
showHiddenRecords(0)
You can do it like this:
Then you can remove the in-line functions all-together.
If you want to toggle something else, you can use
.toggle(), like this: