I have a show/hide button that I'd like to change text & add rollovers...
at this page: www.azaallen.com
I have a button on the left, part way down that says "show/hide resume" How could I...
1) make the text read either "show" or "hide" when the button is clicked?
2) put a rollover effect on the button (simple text-shadow)
I've tried finding tutorials, but they are all for other types of buttons (submit, etc)
Should I be using a different type of button?
Consider this ...
First find this:
and change to this:
<input type="button" id="resButton" value="Hide / Show Resume" onclick="toggleResume()">
Then add this change:
<input type="button" id="resButton" value="Hide / Show" onclick="toggleResume()">
... or some other appropriate background color.
<input type="button" id="resButton" value="Hide / Show"
Thanks JMRKER - the I forgot about the onmouseover events!
As for the text, I wasn't clear... I am trying to get the text to read either show or hide whenever I click the button so that it changes to reflect what the button will do. So it will display "Hide Resume" to let the user know they can hide it, and then after they've hidden it, the button will display "Show Resume".
One possible solution ...
Change the value of the button in the 'toggleResume()' function.
Determine message displayed by condition of the style.display.
Thank you very much... it was simpler than I thought!
I just added
document.getElementById("resButton").value = "Show Resume";
to my existing if/else statement.
document.getElementById("resButton").value = "Hide Resume";
Thanks so much for your help!
You're most welcome.
Glad I could help.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)