/    Sign up×
Community /Pin to ProfileBookmark

Making buttons invicible/visible

Hi,

Does anyone know how to make a specific button visible/invisible using javascript?

I think it has something to do with CSS…..

Thanks !

Mike

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@saulssSep 29.2005 — try:
[code=html]<input style="visibility:hidden" tyep="button" value="you cannot see me">[/code]
Copy linkTweet thisAlerts:
@jiserauthorSep 29.2005 — But how do you make that specific button visible/invisible using a function. So I make the button visible/invisible using a Onclick event...
Copy linkTweet thisAlerts:
@saulssSep 29.2005 — [code=html]<input id="myButton" style="visibility:visible" type="button" value="now you see me..." onclick="hide()">
<script>
function hide()
{
document.getElementById('myButton').style.visibility="hidden";
}
</script>[/code]


or

[code=html]<input type="button" onclick="this.style.visibility='hidden'" value="now you see me..">[/code]
Copy linkTweet thisAlerts:
@jiserauthorSep 29.2005 — ><script>

>function hide()

>{

>document.getElementById('myButton').style.visibility="hidden";

>}

></script>


Perfect!! and after the button has been made invisible, how do you make him visible again using a function?
Copy linkTweet thisAlerts:
@saulssSep 29.2005 — [CODE]<script>
function show()
{
document.getElementById('myButton').style.visibility="visible";
}
</script>[/CODE]
Copy linkTweet thisAlerts:
@jiserauthorSep 29.2005 — Thank you so very much for your help !!
Copy linkTweet thisAlerts:
@saulssSep 29.2005 — sure np
×

Success!

Help @jiser spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...