I have an html button control that I want to hide based on a certain value.
When my page first loads, the display is set to none. Then I do:
if (str == "NO") {
document.getElementById('gob').style.display = "none"; }
else {
document.getElementById('gob').style.display = "block"; }
The first time str is NO, I don't see the button, which is fine.
The first time it goes into the else condition, I see the button, which is fine.
But the next time str is NO, for some reason I can still see the button with no text in the button.
If I refresh the page, it resets the page so that if str is NO, I don't see the button.
If I do a response.redirect it should work--how do I do something like that with clientside javascript??
Thanks.
When my page first loads, the display is set to none. Then I do:
if (str == "NO") {
document.getElementById('gob').style.display = "none"; }
else {
document.getElementById('gob').style.display = "block"; }
The first time str is NO, I don't see the button, which is fine.
The first time it goes into the else condition, I see the button, which is fine.
But the next time str is NO, for some reason I can still see the button with no text in the button.
If I refresh the page, it resets the page so that if str is NO, I don't see the button.
If I do a response.redirect it should work--how do I do something like that with clientside javascript??
Thanks.