Javascript and OnCheckedChange

  • Thread starter Thread starter czuvich
  • Start date Start date
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.
 
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.
 
Back
Top