I have a webpage that works with ajax, html and php. No XML
The ajax part works good instead of one thing. The whole page(with the header image and all the html code) is loading again plus the results from my php script into the <div id="jobs"></div>.
a = document.getElementById('jobs');
a.innerHTML = '<div id="jobs"></div>';
a.innerHTML = httpRequest.responseText;
I guess that the problem is in the url.
For example:
http://www.mywebsite.com/index.php?id=test
I have a form on that page. When I submit the form (with ajax) the url that I post is something like:
http://www.mywebsite.com/index.php?i...=1&something=2
this url doesn't appear in the location bar.
So the page loads the result I want AND the whole html code from
http://www.mywebsite.com/index.php?id=test again!!!
So I see the webpage 2 times.
Sorry for my english. :(
Please help me!!
geoko