Hi all,
if anyone wants a way of making parts of web pages updatable so as to make the page appear fast,
but without using AJAX (it's easy actually, but for a variety of reasons, you might not want to use AJAX in some places), then here's a way:
See these:
<a href="
http://www.cs.cmu.ed...Test/index-html.html">
http://www.cs.cmu.ed...Test/index-html.html</a>
and
<a href="
http://www.enomaly.n...i.gui.loadpanel.html">
http://www.enomaly.n...i.gui.loadpanel.html</a>
Basically, they use inline frames for updating parts of web pages (DOM nodes) instead of using AJAX.
There ought to be many other such scripts as well.
FWIW, here's my favourite rant about Javascript:
The single biggest mistake that mot ordinary web developers commit today is to think of Javascript as DHTML. I don't know of any language called DHTML. I know of Javascript. And it's not really an operation in assembling Lego blocks. It's surprising how Javascript editors and IDEs are far less in number than C/C++/Java editors and IDEs. Javascript is *not* Dynamic HTML. There is no "dynamic" HTML. HTML is static. CSS comes to close, but it's CSS. So you need to *study* and learn Javascript, not just "throw some scripts into the page".
Ok, coming back, you can quickly hack up a set of functions to load any iframe node in your final page with the HTML from a normal HTML file (containing only as much information as is needed for the small rectangle in which it is to be shown), using the url/src property of the iframe. That's it!
You could do it with normal frames as well, as long as you would not get confused.
Then there is the big argument that saving pages and book marking pages becomes a royal pain.
Saving:
One only needs to think a little: you have the DOM with you, you have the DOM of the iframe's HTML file with you, you know how to traverse DOMs - you can make a separate popup page with all the correct HTML in it and the user can save it
Bookmarking:
Same as above plus a "Bookmark Me" button on your main page or on the popped up page
There's another part as well:
Using a hidden iframe to load and retain all the data into so that it essentialy does the job that an array of objects would have in any other programming language, and then using the contents of the appropriate nodes in the DOM tree of that hidden HTML document to find and update data into teh visible document. Seems like an ugly hack but it has its merits, since once you use the standard AJAX method, after N AJAX loads into say a "photo" element, your old data (N-1 photos) could be lost unless you use some mechanism to store it. So you might have to hack around any way.
Criticisms / opinions / comments / suggestions welcome
-2stepsback