This is a migrated thread and some comments may be shown as answers.

Help with pop-up alert.

1 Answer 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
risho
Top achievements
Rank 1
risho asked on 13 Aug 2008, 08:49 PM
You'll have to excuse me, but JavaScripit and I are like water and oil. Furthermore, AJAX and Rad controls complicate things even more. I must admit though that AJAX is really cool and so is Rad. So here is what I'm up against.

I have a asp:LinkButton that I want a to force a clientside popup to warn user not to click the submit button twice. It would be OK if I didn't have an OnClient method already declared in the code behind like this: "this.btnSubmit.OnClientClick = "return ValidateForm();";".
I also want to keep with a site curent formating and want to have the popup resemble another button's OnClient call using the radconfirm function (like this: "OnClientClick="radconfirm('Blah-Blah',DoPostBack_Back,300,150,'','Notice!'); return false;""

So can someone suggest how to incorporate this radconfirm in my existing JS function.

what I think I need is something like this:
function ValidateForm()
    if ("USER HAS CLICKED OK ON THE POPUP")
    {
        Do my validation stuff
    }
    else
    {
        do nothing
     }

Thanks,
Risho

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 15 Aug 2008, 01:34 PM
Hi Risho,

If I understand you correctly, you need to show a confirmation dialog before validation and if all is OK - to postback. If this is so, please check the attached sample - I hope it will help.



Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
risho
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or