This is a migrated thread and some comments may be shown as answers.
Click before OnClientClick
3 Answers 32 Views
This is a migrated thread and some comments may be shown as answers.
rgf21
Top achievements
Rank 1
rgf21 asked on 30 May 2008, 02:10 PM
Hi.

I have a button to close my radwindow throw javascript, but I also want to insert to my bd, so I have the ImageButton2.Click handler with the vb.code and call the javascript with OnClientClick. But it isn't working because the window is closed before the insert in the bd. Is any way of execute the handler before the OnClientClick?

Thanks

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 02 Jun 2008, 12:57 PM
Hi rgf21,

OnClientClick is a client eventhandler and is executed immediately after clicking the button - that is why you get this behavior. What I can suggest in your case is to first save the content in your database from the server and then to output the Javascript which will close the window itself.



Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
rgf21
Top achievements
Rank 1
answered on 02 Jun 2008, 01:24 PM
How can I do that? Can I close the windows without javascript? I need to save and the close with only one button click...
0
Georgi Tunev
Telerik team
answered on 02 Jun 2008, 02:44 PM
Hi rgf21,

Outputting Javascript from the server is not related to the RadWindow controls but is a general task. More information on the subject is available in the Net - you can also check the following KB article:
http://www.telerik.com/support/kb/article/b454K-gtd-b454T-cec-b454c-cec.aspx


I attached a small sample that shows one possible approach. Please use it as a base and extend it further if needed to fit your requirements.



All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Asked by
rgf21
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
rgf21
Top achievements
Rank 1
Share this question
or