Home All Groups Group Topic Archive Search About

ASP .Net Message box help Needed Very urgent

Author
24 Mar 2005 7:20 AM
Thankaraj U via DotNetMonster.com
Hello Group,

This is my code.

butPrev.Attributes.Add("OnClick", "return confirm('Do you want to SAVE this
item?');")

How to capture whether the user is click "OK" or "CANCEL" button. I want
the javascript returning value.

If the user click "OK" then what is the returning value.
If the user click "CANCEL" then what is the returning value.

How to find out these values.

Any one can help me please?

Regards,
Thankaraj

--
Message posted via http://www.dotnetmonster.com

Author
24 Mar 2005 8:27 AM
Eliyahu Goldin
> If the user click "OK" then what is the returning value.
true
> If the user click "CANCEL" then what is the returning value.
false

Eliyahu

Show quoteHide quote
"Thankaraj U via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in
message news:45f528c01fa54d6f9a42c75854c52fa1@DotNetMonster.com...
> Hello Group,
>
> This is my code.
>
> butPrev.Attributes.Add("OnClick", "return confirm('Do you want to SAVE
this
> item?');")
>
> How to capture whether the user is click "OK" or "CANCEL" button. I want
> the javascript returning value.
>
> If the user click "OK" then what is the returning value.
> If the user click "CANCEL" then what is the returning value.
>
> How to find out these values.
>
> Any one can help me please?
>
> Regards,
> Thankaraj
>
> --
> Message posted via http://www.dotnetmonster.com
Author
24 Mar 2005 6:08 PM
Elton Wang
Hi Thankaraj,

As Eliyahu's post you can have true value for "OK" and
false for "CANCEL" in client-side.

Actually in your serve-side process, you don't need worry
about "CANEL", it doesn't post back to server. Only user
clicks "OK" confirmation, it posts request to server.

HTH

Elton Wang
elton_w***@hotmail.com


>-----Original Message-----
>Hello Group,
>
>This is my code.
>
>butPrev.Attributes.Add("OnClick", "return confirm('Do you
want to SAVE this
>item?');")
>
>How to capture whether the user is click "OK" or "CANCEL"
button. I want
Show quoteHide quote
>the javascript returning value.
>
>If the user click "OK" then what is the returning value.
>If the user click "CANCEL" then what is the returning
value.
>
>How to find out these values.
>
>Any one can help me please?
>
>Regards,
>Thankaraj
>
>--
>Message posted via http://www.dotnetmonster.com
>.
>