Hi All,
I have a ajax call in script like below -

function testMe()
                type: "POST",
                url: "",
//                data: "ajax=1&elem=" + elem+"&clicker="+clicker,
                data: "ajax=1",
                method: "POST",
                success: function (html) {
                        alert(html+' >>');
                        return false;
//                      var response = html.split('@'); 
//                    document.getElementById(elem).innerHTML = "";
                    document.getElementById('cmbxCategory').innerHTML = "";
                    document.getElementById('cmbxType').innerHTML = "";
                    document.getElementById('cmbxProvider').innerHTML = "";
                    //alert(response[0]+' >>'+response[1]+'>>'+response[2]);
//                    $('#'+elem).prepend(html.responseText);
//                    return false;
                error:  function(request, error){
//                    return false;
            return false;

this testMe() is called on click of a button -

<button class="btn" id="1u" onClick="testMe(this.id, 1, 'cmbxCategory');">U</button>

And my testAjax.php page contains just a single line below -


echo 1; exit;


jquery file is included already. despite this very simplistic approach this example does not work in firefox any version with the error in console as -

Error: NS_ERROR_NOT_AVAILABLE: prompt aborted by user
Source File: resource:///components/nsPrompter.js
Line: 425

Note : this is very simple representation of the actual scripts I have and this same example above doesnot work either in FF.While the same works nicely with internet explorer. I have created a seperate test pages like above.

would appreciate any suggestions this.

Member Avatar

I'm assuming that the url is not on a separate domain.

Why not use 'post'?

    $.post('', {ajax: '1'})

Also, you can forget that inline call if the button is the only one that should call this routine. Else, you can shove the routine into a function and get the click handler to call that function.

Helli diafol, thank you for your response on this. I think it wouldnt make much difference either with jquery post or ajax directly.
But never mind I solved it already. The problem was it only needed 'return false;' at the right place.