...

View Full Version : Dynamic DIV



parallon
01-13-2010, 05:28 PM
Hello all. I am currently viewing various reports based on a location chosen by a dropdown. When I select GO, the page sends the location to a popup, which then queries based on that location and displays the graph on the popup window. What I want to do is to eliminate the popup and send the location to a <div> on the same page and then have the query run and display the graph on the same page. Is this possible, or do Divs have to be static content?

Thanks,

Parallon

gusblake
01-13-2010, 06:13 PM
It can be done with AJAX (or 'SJAX' in this case):



var request=window.XMLHttpReqest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");
request.open("GET", "yourpage.html", false);
request.send(null);

document.getElementById("yourdiv").innerHTML=request.responseText;


but why not just use an iframe?

parallon
01-13-2010, 07:10 PM
Thanks alot. I totally forgot about iframes. As usual, I always try to over complicate things... :)

Parallon



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum