Click to See Complete Forum and Search --> : Reloading a part of a webpage
peteyb
02-01-2008, 07:17 AM
Hi all
I have a drop down which triggers a page reload. The result of this is a series of drop downs which are dependent on which option was selected in the first drop down.
Is it possible to get the page to reload just the drop downs or part of the page where the drop downs are.
I am experimenting with iFrames but they are prooving a little awkard.
peteyb
02-01-2008, 10:28 AM
anyine got any ideas? maybe using ajax of some description?
TheRave
02-04-2008, 07:27 AM
Yeah check out ajax. Use some divs and spans then js to control/update their content.
peteyb
02-04-2008, 08:37 AM
Know of any existing scripts I could work from?
peteyb
02-05-2008, 07:20 AM
I have divs around each of the page sections I want to reload.
How can I get javascript to reload just the divs?
jasonahoule
02-05-2008, 07:32 AM
You are going to have to write JavaScript code to do what you want. There isn't going to be any specific script to do what you want.
There are two ways to do this.
1. Use strictly Javascript. If this is static data then just put it into a script. Then there is no need to make a call back to the server.
2. If the data needs to be dynamic then make a call back to the server using the XMLHttpRequest object.
If you are not very familiar with Javascript I suggest using the Prototype library. It will make it very easy for you to make AJAX calls and works in all browsers.