User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 402,036 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,459 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

How to retain the disable state of the button after page refreshing

Join Date: Sep 2007
Posts: 11
Reputation: pedramphp is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
pedramphp pedramphp is offline Offline
Newbie Poster

Re: How to retain the disable state of the button after page refreshing

  #4  
Sep 9th, 2007
Originally Posted by srinivaskota View Post
Hi Experts here,
Pls help.

when I disable the button using the code

document.getElementById("mybutton").disable=true;

it is disabling perfectly but when the page gets refreshed again it comes
to enable position

so, I need a code even when the refreshing the page also my button is in disable position.

Thanks and Regards,
Srinivas yadav.



you have to do like this...
because you have made the input button after the head tag you can not use the script in the head so you have to write the code after the input button , another problem you had you have to use disabled instead of disable
<html>
<head><head>
<body>
<input type="button" name="mybutton" value="mybutton">
<script language="javascruipt>
document.getElementById("mybutton").disabled=true;
</script>
</body>
</html>

best REgards Pedram
Pedramphp@gmail.com
Reply With Quote  
All times are GMT -4. The time now is 10:54 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC