By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

javascripts+set attributes

P: 31
Hi,

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
Share this Question
Share on Google+
2 Replies


10K+
P: 13,264
Post the code you used. Most likely you are mixing client side code with server side code.
Jul 29 '08 #2

RamananKalirajan
100+
P: 607
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.

Regards
Ramanan Kalirajan
Jul 29 '08 #3

Post your reply

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