Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call an image and map

Status
Not open for further replies.

SuperComputing

IS-IT--Management
Oct 11, 2007
57
US
OK, Lets say that I have an online catalog with 20+ pages. I am putting a 'table of contents' at the top of the page. It is an image that looks like several buttons and a map that will take you to "page04.htm" when you click on "widgets", etc...

If in the future the catalog changes and now when you click on "widgets" it should take you to "page08.htm" instead.

How can I set this up now where I won't have to go back and edit all 20+ pages with the new location?

Can I have a .js file that stores the location of the image and the map and just have a script on each page call it?
 
Can I have a .js file that stores the location of the image and the map and just have a script on each page call it?

Yup, but that's a far cry from the best way to accomplish this. You might want to look into server side include files as an alternative since your page will still work when users have javascript disabled.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Send the page parameter in the URL and then just use 1 page to load the appropriate items.

Or you can make that part a server-side include (SSI) on all the pages so any changes you make to the one section are a part of all the pages that include the menu system. You can easily do that using whatever server-side scripting language is available to you, or by using SHTML page extensions if your web host supports that.

Lee
 
Did me again, kaht!

Sounds scary!

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top