tags:

views:

36

answers:

2

Hi,

I have a page and when a client use this page, Javascript code trigger Another Page. I dont want to redirect another page. Javascript must only trigger another page and First page continue to its working.

this is imposible?

+3  A: 

It is called AJAX.

You should use a library like jQuery: http://api.jquery.com/category/ajax/

$.get("test.php", function(data){
  alert("Data Loaded: " + data);
});
Ghommey
Why *should* he use a library for something so trivial?
Sean Kinsey
Thanks,But I dont want to JQuery.
Murat
+3  A: 

And the no-jQuery solution

var xhr = ("XMLHttpRequest" in window) ? new XMLHttpRequest() : new ActiveXObject("Msxml3.XMLHTTP");
xhr.open("GET", "pathtofile.html", true);
xhr.send("");

This will request a file from the server without doing anything to the response.

Sean Kinsey
+10 if I could over the jQuery solution.
Matt
Very Thanks Sean,It works fine.
Murat