471,854 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,854 software developers and data experts.

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 1587
13,262 8TB
Post the code you used. Most likely you are mixing client side code with server side code.
Jul 29 '08 #2
608 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
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.