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

Getting two postbacks with Firefox, not in IE...

2 Answers 128 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 29 May 2008, 07:22 PM
I've got a radajax panel in a modal popup (ajaxcontroltoolkit). There is a button (html) in the radajaxpanel which has an onclick event which causes the panel to postback using the initAjaxRequest function specified in the API (control.ajaxRequest(args)).

This is working fine in IE but in Firefox there two postbacks occur (I have a breakpoint in the RaisePostBack event on the server, I get the same postback event twice in firefox) causing an issue with the rest of logic. Also in IE the appropriate loading panel displays whereas in Firefox it does not.

Any ideas?

2 Answers, 1 is accepted

Sort by
0
Accepted
Baatezu
Top achievements
Rank 2
answered on 30 May 2008, 08:34 PM
I'd check the buttons "UseSubmitBehavior" is false, since you are doing the postback via a different method. I think that's the setting that needs to be flipped when you use javascript to cause the postback.
If you use the OnClick="MyJavaScript(args);"  to get things going, change it to OnClick="MyJavaScript(args);return false;" which will also stop it from causing a postback from the button.
0
Josh
Top achievements
Rank 1
answered on 30 May 2008, 10:19 PM
That's it, thanks!
Tags
Ajax
Asked by
Josh
Top achievements
Rank 1
Answers by
Baatezu
Top achievements
Rank 2
Josh
Top achievements
Rank 1
Share this question
or