Hi Mootooler,

I have problem with my mootools's statement

document.id("myAhref").addEvent("click", function(event) {
                                        event.stop();
new Request({
     url: 'http://test.com/requestData.php',
                                             async:    false,
                                             method: 'POST',
     data: {'key': 'value'},
      onComplete: function(responseText) {
if (responseText != undefined) {
 var newWindow = window.open('http://test.com/example.php');
if (newWindow && !newWindow.closed) {
 newWindow.focus();
}
        }
    }
      }).send();
});

*It does not work Safari and others are so good, I don't see error.*
*but in JQuery it work as well.*
*I don't know what is the problem*

$("# myAhref ").click(function(e) {
                                        e.preventDefault();
                                        $.ajax({
                                                url: '
http://test.com/requestData.php',
                                                async:    false,
                                                type: "POST",
                                                data: {'key': 'value'},
                                                success:
 function(responseText) {
                                                        if (responseText !=
undefined) {
                                                                if
(responseText != undefined) {
 var newWindow = window.open('http://test.com/example.php');
if (newWindow && !newWindow.closed) {
 newWindow.focus();
}
                }
                                                        }
                                        });
                                });






Thanks,
Sitthykun LY

Reply via email to