I would appreciate it if someone can point me into the right direction on this please. I have five pages for a site:
- index.html
- cars.html
- planes.html
- toys.html
- contact.html
‘index.html’ makes the load() call and loads just the content of the clicked nav link. Lets say if user types the URL:
“http://www.abc.com/cars.html”
user is taken to ‘cars.html’ page instead of ‘index.html’. Now if the user from within ‘cars.html’ page’s nav clicks on planes, I want to call ‘index.html’ and then make the load() call to load the content of ‘planes.html’.
So pretty much I am checking for “index.html” page, and if it is not the one loading the other pages’s content then I would like to call the “index.html” and then load the requested page content within.
check the current page with
window.locationin javascriptand then redirect where needed