PDA

View Full Version : Completely Changing the Contents of a Divide



Missle Launch
08-17-2007, 11:52 PM
What I'm trying to do is be able to altnernate between preset div-contents that may be completely different in structure. For example, one set of contents is a simple `<script language="javascript" src="foo.js"></script>", while another is a form made with a JavaScript/AJAX-combo. What I'm trying to do is have a form that takes information that the script uses, and the two being swapped out on the client-side, to speed up the process and save the server from repeatedly resending the page: another benefit is that the single, multipurposed page is added to search-engines.

Perhaps I ought to have both loaded at once, and have the change-button make one of them invisible?

Twey
08-18-2007, 07:39 AM
Perhaps I ought to have both loaded at once, and have the change-button make one of them invisible?Aye. Be careful to provide a separate full page containing the other for non-JS browsers though -- a server-side language can make this more efficient.