Hi
Have a problem that shows with firefox (2.0.0.15 on Windows) but not with
IE (6). I'm using the Form plugin with a trivial form. I'm using a call to
$.ajaxForm() to do an ajax form submission.
It never works with firefox, and instead I get this really user friendly
error message in the error console:
Error: [Exception... "'Permission denied to call method
XMLHttpRequest.open' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
Note, this is not fixed by sticking autocomplete="off" into the input
controls (some versions of firefox seem to have bugs in autocomplete that
can lead to this kind of problem; adding autocomplete="off" is supposed to
work round that but it makes no difference here).
Here is a cutdown sample html that demos the problem. You'll note that I've
set handlers on the ajaxForm() call to output the request and response, but
otherwise do nothing. When run on IE this does exactly what you'd expect -
you see an alert before the ajax request is sent, and another when the
response is received, and the page remains loaded in the browser. On
firefox the first alert appears ok but the response alert never shows,
instead you get the above error and the browser then changes the displayed
page to be the ajax response text from the server.
Any ideas?
--
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; lang="en-US" xml:lang="en-US">
$(function(){
$('#rc_form').ajaxForm({ beforeSubmit:
function(formData, jqForm, options) {
var queryString = $.param(formData);
alert('About to submit: \n\n' +
queryString);
return true;
},
success:
function (responseText, statusText) {
alert('status: ' + statusText +
'\n\nresponseText: \n' + responseText);
}
});
});
--
Thanks
Colin
At 22:08 16/06/2008, you wrote:
>Hi
>
>Newbie user and I guess this probably has a simple answer.
>
>I have a hidden div on the page that is shown when user clicks a button.
>Its a help text, in a div, for the page that is only to be shown when the
>user wants it. But the page is long and when I un-hide the div I also want
>the browser to scroll the document so as to ensure this div actually
>visible within the browser window.
>
>Is there an easy way in jQuery to ensure a given element is actually
>visible on screen and not scrolled off the bottom?
>
>
>Thanks
>Colin
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG.
>Version: 7.5.523 / Virus Database: 270.3.0/1503 - Release Date: 14/06/2008
>18:02
>
>
>
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG.
>Version: 7.5.523 / Virus Database: 270.3.0/1503 - Release Date: 14/06/2008
>18:02
--
Internal Virus Database is out-of-date.
Checked by AVG.
Version: 7.5.523 / Virus Database: 270.3.0/1503 - Release Date: 14/06/2008 18:02