Javascript and OnCheckedChange

C

czuvich

All,

I am trying to use both the OnCheckedChange event and the OnClick event
in a Checkbox. I am currently doing some javascript for the OnClick
Event as illustrated here:

Me.ckbAdvanced.Attributes.Add("OnClick",
"JavaScript:Swap('advancedoptionsmenu');")

This works fine. However, when I try to run some server side code with
the OnCheckedChange event, the event never fires. Could anyone help me
out?

Here's my scenario: On my web page, I have a menu that drops down
whenever the ckbAdvanced checkbox is clicked. If that button check is
true, then I pull data from a database and display it in the menu that
dropped down. Thanks.
 
E

Eliyahu Goldin

Try Me.ckbAdvanced.Attributes.Add("OnClick","return
Swap('advancedoptionsmenu');")

and make the Swap function return true if you want the event to proceed to
the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top