Data loading question
September 13, 2004 1:51 AM   RSS feed for this thread Subscribe

JavaScript (probably)...

Is there a reliable, cross-browser, way of loading dynamic (server side) data into a page without a reload (using a client side script)? I'm trying to imitate the action of a pop-up (supplying context-sensitive information), but in div without having to use new windows or iframes or anything.

I've found a couple of proprietary xml methods, but nothing I can rely on.
posted by monkey closet to computers & internet (6 comments total)
XMLHttpRequest and innerHTML
posted by yerfatma at 4:02 AM on September 13, 2004


Remote scripting with an iFrame will catch more browsers than XMLHttpRequest, (if you don't mind a "reload" happening in a hidden iframe).
posted by alan at 4:38 AM on September 13, 2004


It's worth noting, though, that support for XMLHttpRequest is rapidly growing in browsers, because of its use in Gmail.
posted by reklaw at 4:42 AM on September 13, 2004


The method I've used is similar to the iFrame idea, but uses a regular frame, hidden by setting the frameset to 100%, *. Load data into the hidden frame, then onLoad have it shuttle its data to your page via the DOM.

It's both reliable and cross-platform (back to NS4) since it doesn't rely on iFrames.
posted by Jeff Howard at 10:32 AM on September 13, 2004


Yeah, but then you have a *shudder* regular frame. :)
posted by alan at 11:29 AM on September 13, 2004


Awesome, yerfatma. I've been recently looking at doing some advanced XML work and had given up on IE since all the scripts I'd found triggered security warnings (unacceptable), but the one you linked to doesn't. Yay hooray!

You just saved me from writing my own XPath and XML Schema parsers... although I'm kind of sad, too, since I've already written a large chunk of both, and now the effort's likely wasted.
posted by Khalad at 2:53 PM on September 13, 2004


« Older How can I get rid of the odour...   |   how is skywriting achieved ?, ... Newer »
This thread is closed to new comments.


Related Questions
What should I learn in order to do web development? October 15, 2008
Help me AJAXify a portion of my project without... January 8, 2008
Mark CF, if you're reading this, shoo! January 23, 2007
What's the step BEFORE "newbie" called? January 4, 2007
Your favorite web design tricks? March 16, 2006