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

[Solved] Using RegisterOnSubmitStatement on pages w/ AJAX

1 Answer 76 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 12 Jun 2008, 09:14 PM
I am using RegisterOnSubmitStatement (from PageLoad event) to catch form submits in Javascript. On pages using RadAjaxPanel, my Javascript is also called for every AJAX POST as well. Is there a way to tell when the Javascript is called if this is for an AJAX request or a "real" page POST back? Or, can I only register the OnSubmit script somehow to only be called for real POSTs (as opposed to each AJAX POST)?
Thanks!

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 16 Jun 2008, 12:39 PM
Hello Jay,
You can check if the postback is comming from AjaxPanel and if it's not it's a regular postback.
Check the attached example.
I hope that's helpfull!

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Jay
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or