igotstehsolution
asked on
asp:CheckBox oncheck="function1();" onUncheck="function2(); how do I?
Currently I have:
<asp:CheckBox runat="server" Enabled="true" ID="alreadyowndomain" Text="I already own the domain name(s) I need." onclick="slidedown('alread yTakenDiv' );" onUnCheck="slideup('alread yTakenDiv' );" />
onclick works.
onUnCheck doesn't work.
What I am trying to do is get slidedown('alreadyTakenDiv '); when checked.
and slideup('alreadyTakenDiv') when unchecked.
How can I do this?
Thanks sooo much ahead of time.
<asp:CheckBox runat="server" Enabled="true" ID="alreadyowndomain" Text="I already own the domain name(s) I need." onclick="slidedown('alread
onclick works.
onUnCheck doesn't work.
What I am trying to do is get slidedown('alreadyTakenDiv
and slideup('alreadyTakenDiv')
How can I do this?
Thanks sooo much ahead of time.
Set AutoPostback to true
ASKER
AutoPostback breaks the javascript.
Anyways I do even know that onUnCheck is a real attribute. I put it there as an example.
Ideally i would need 2 attributes such as onCheck and onUnCheck where I could put a function in each.
Is this possible and how can I do this?
Anyways I do even know that onUnCheck is a real attribute. I put it there as an example.
Ideally i would need 2 attributes such as onCheck and onUnCheck where I could put a function in each.
Is this possible and how can I do this?
Use this :
<asp:CheckBox runat="server" Enabled="true" ID="alreadyowndomain" Text="I already own the domain name(s) I need." onclick="slide(this.checked,'alreadyTakenDiv');" />
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that breaks the function aswell.
<asp:CheckBox runat="server" Enabled="true" ID="alreadyowndomain" Text="I already own the domain name(s) I need." onCheck="slidedown('alread yTakenDiv' );" onUnCheck="slideup('alread yTakenDiv' );" />
I need it to look like the tag above. The only problem is I don't think onCheck or onUnCheck are real attributes.
<asp:CheckBox runat="server" Enabled="true" ID="alreadyowndomain" Text="I already own the domain name(s) I need." onCheck="slidedown('alread
I need it to look like the tag above. The only problem is I don't think onCheck or onUnCheck are real attributes.
onCheck and onUnCheck is not javascript attributes but ASP.NET attributes so running on the server side.
>that breaks the function aswell.
Why ? You call an intermediate function to call the right one (the onUnCheck or onCheck method)
>that breaks the function aswell.
Why ? You call an intermediate function to call the right one (the onUnCheck or onCheck method)
ASKER
didn't see function when typed response. testing now :)
ASKER
Works perfect thank soo much!!