Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 6th, 2006, 11:25 AM
Registered User
Join Date: Jun 2006
Location: , , Greece.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default AJAX problem - the whole page is reloading

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:

I have a form on that page. When I submit the form (with ajax) the url that I post is something like:

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!!

Reply With Quote
  #2 (permalink)  
Old June 7th, 2006, 01:39 PM
Registered User
Join Date: Jun 2006
Location: , , Greece.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

The solution to that problem is:
I created a new page that contain my code and I included that page to the "http://www.mywebsite.com/index.php?id=test".

So all the process is being in the new page and appear in the "http://www.mywebsite.com/index.php?id=test".

geoko :D

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reloading page with Ctrl+F5 aliirfan84 ASP.NET 2.0 Professional 1 October 10th, 2007 07:19 AM
reloading a page hubbe ASP.NET 1.0 and 1.1 Basics 0 April 13th, 2006 01:46 PM
Reloading page when option selected in dropdown chandrasekhar200 Beginning PHP 1 March 10th, 2006 04:52 AM
Page Reloading mahulda ASP.NET 1.0 and 1.1 Basics 5 April 21st, 2004 10:22 AM

All times are GMT -4. The time now is 05:00 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.