I would like not to dispaly the pop-up message below when post back occurs. My page has nothing to do with pricing it is displaying ms chart that updates on postback. How to disable in code or java script?
to display the webpage again internet explorer needs to resend the information you’ve previously submitted.
This is the javascript i’ve tried: doesn’t work though.
<script type="text/javascript">
// <!--
function submitForm() {
window.opener.document.forms[0].submit();
}
// -->
</script>
and is attached the function to the form as so:
<body>
<form id="form1" runat="server" onsubmit="submitForm()">
I’d bet you’re doing this in your JavaScript:
While the above code comes from the Facebook documentation, and it works for a standalone website implementing the Facebook JavaScript SDK, it will break your Facebook App in Internet Explorer and Firefox by causing an infinite loop.
When Facebook loads an App, it sends information about the user’s authentication state via POST. The SDK processes this data and authenticates the user.
By telling the JavaScript SDK to reload the page upon successful authentication, Firefox and Internet Explorer interpret this to mean they should send the POST data again, too. Your App receives the POST data again, re-authenticates the user, and reloads the page, causing the infinite loop.
Solution: don’t use
window.location.reload(). Instead you’ll need to setwindow.location.href(or otherwise strip the POST data from the browser request).