Friday, May 8, 2009

Loading HTML page into another

Options of loading an html page into another?

First option "easiest option and worst"

    is using the frameset and frame tag to load one page into another, the main disadvantage of that method is that you have multiple scroll panes one for each page which make the total layout of the page sucks, example
Second options is also easy

but your server has to support PHP to work correctly on it, in that case you can use the tag <?php include("another.php");?> which will loads the another page in the original page
    Third option "which I like most may be not as easy as prevoius alternatives"

    is to use Ajax calls through JavaScript load html page into an empty div, so your server need not support any special language, the page layout will looks normal. The only disadvantage of that method is that style of the imported page will not be imported as well, example

No comments:

Post a Comment