My idea how to use ajax nav and give non-js support
Posted: Tue Jan 02, 2007 8:57 am
I just came up with an idea of how to make AJAX load page content but if the user doesnt support javaScript have it load the whole page..
Heres an example link on one page which will use AJAX to load just the content of content1.php or if the user doesnt support Js, will reload the whole page again...
processajax() is a function i made to process the ajax (serverpage, container).
Here is an example content of content1.php
Heres an example link on one page which will use AJAX to load just the content of content1.php or if the user doesnt support Js, will reload the whole page again...
processajax() is a function i made to process the ajax (serverpage, container).
Code: Select all
<html>
<head>
</head>
<body>
<div id="header">
// header image here.
</div>
<a href="content1.php" onclick= "processajax('content1.php','content') return false;">Content page 1</a>
<div id="content"></div>
</body>
</html>
Code: Select all
<noscript>
<html>
<head>
</head>
<body>
<div id="header">
//header stuff here/
</div>
<div id="content">
</noscript>
<p>Lorem ipsum dolor sit amet...</p>
<noscript>
</div>
</body>
</html>