I have a page where the user can change an address, and when they click Update, I need to run some javascript on the page to ask if they want to change some related addresses, THEN run the code on the server.
So on the .aspx page I have a javascript function:
and on the RadMenuItem I have: BTW, I've tried onClick, onItemClick, onclick and the one in the code now.
So on the .aspx page I have a javascript function:
function
confirmAddressChange()
{
if
(document.forms[0].hfAddressChange.value ==
""
)
{
var
res = (confirm(
'Update Contact Addresses to Match?'
)==
true
);
document.forms[0].hfAddressChange.value = res;
}
return
true
;
}
and on the RadMenuItem I have: BTW, I've tried onClick, onItemClick, onclick and the one in the code now.
<
rad:RadMenuItem
ID
=
"rmitmUpdateInfo"
runat
=
"server"
ImageUrl
=
"~/Images_ABL_Std/Grid/Update.gif"
Text
=
"Update"
Value
=
"update"
ToolTip
=
"Accept changes"
OnClientItemClicking
=
"confirmAddressChange()"
>
</
rad:RadMenuItem
>
What I need to happen is to have the page run the javascript, where I set the value of a hidden field, then run the server code. At this point it skips the javascript and goes directly to the server code.
Anyone have a suggestion or answer?
Thanks.