Ajax Navigation2

JavaScriptSource Staff Dec 6, 2006

General

When a visitor clicks on a specific link, the content of that link is inserted into the page without a refresh. When a page doesn't exist, a user-friendly error message is given. [Note: This is an edited version of the original script.]


My Navagation links
Go to page 1
Go to page 2
Go to page 3
Go to page 4
Broken Link

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: ajaxNavigation2.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(34 comments)

22. From: Erick[br /][br /]I have the exact same problem![br /][br /]Script works fine for static sites. But the caching is a pain for dynamic sights!

Andy Apr 23, 2008

Due to the limitations of these comments, you will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Nov 13, 2007

This seems to only work for pages that exist on your own database. Is there a way to get it to work for external sites?[br /][br /]I have only tested this on FF2.0.0.9

Bobby Nov 9, 2007

You will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Nov 6, 2007

Not sure what you mean. It works fine for me using FF 2.0.0.9. Each time I click a link, it loads the page only once.

Lee Nov 6, 2007