469,314 Members | 2,203 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,314 developers. It's quick & easy.

javascripts+set attributes


i am developing a system using asp.net(c#) and javascripts. i make a button in my form disabel in page load method. if a radio button in my page is clicked i have to enable that button. i am using a javascript method in client side to enable the button. however i am calling another javascript method on "onclientclick" method of the button. i have discovered that this onclientclick method is not called after i enabled the button by clicking the radio button.

i tried to use setAttributes method in javascript method of enabling the button back.
document.getElementById("btnSave").setAttribute("o nclientclick","javascript:retrun validateMthod();");

but it does not work

please help
Jul 29 '08 #1
2 1553
13,262 8TB
Post the code you used. Most likely you are mixing client side code with server side code.
Jul 29 '08 #2
607 512MB
Dont complex your logic. The basic concept behind hiding and displaying an element in javascript is very simple. Suppose i am having a button with
id --> 'myButton'. Then use the code in the following way

[HTML] document.getElementById('myButton').style.display= 'none' (to Hide)[/HTML]

[HTML]document.getElementById('myButton').style.display= 'block' (to Unhide It)[/HTML]
If you have any doubts pls post back it. surely I can help you.

Ramanan Kalirajan
Jul 29 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by LC's No-Spam Newsreading account | last post: by
1 post views Thread by Thilanga | last post: by
6 posts views Thread by daniel kaplan | last post: by
4 posts views Thread by swayze | last post: by
7 posts views Thread by Tigger | last post: by
reply views Thread by Dormilich | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.