Reply to Re: visable/invisable button

Your name:

Reply:


Posted by Dima Gofman on 10/02/05 19:13

Here's a little demo. There are two easy methods of making buttons
disappear: using block and visibility styles. If you use block like
"SONY, JP" the browser will remove the button and redraw the page as if
the button was never there - be careful with this method because it
could break formatting of the rest of the page. Second method,
visibility, will hide the button but leave the space where it was
empty, keeping the formatting.


<script type='text/javascript'>
var flag=0;
function toggleButton(){
var obj=document.getElementById('cmd');
if (flag==0){
obj.style.visibility='hidden';
flag=1;
}
else{
flag=0;
obj.style.visibility='visible';
}
}
</script>

<input type='button' id='toggle' value='Click to toggle'
onclick='toggleButton()'>
<input type='button' id='cmd' value='I am a button'>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация