Hi (as usual ) I'm after a bit of guidance/help please....
I have a local html/javascript based image gallery "website" used to display my digital pictures.
it uses a javascript menu/navigation bar which I have on all pages but with the "site" spread across multiple folder levels I'm having to maintain 3 copies of the js code
which as the site/number of pictures I take grows is becoming a pain...
My site is fairly basic in that its got
[pre]
website (Top level html main menu page - js here)
year1 (gallery index with the js menu here too)
htmlp1 (thumbnail pages again with the js menu)
htmlp2
year2
htmlp1
htmlp2
year3
htmlp1
htmlp2
htmlp3
...
year 17 etc
htmlp1
htmlp2
sitefiles
js
css
images
in the js menu I refer to base images, urls etc via href/src tags and currently use relative references
i.e src='sitefiles/images/image1.jpg'
however whilst 99% of the code is then identical for the 2nd folder level pages i have to use
src='../sitefiles/images/image1.jpg'
and the lower level thumbnail pages
src='../../sitefiles/images/image1.jpg'
[/pre]
I know I can probably use something like src="file://d:/website/sitefiles/images/image1.jpg' but that just seems to cause it to grow in size (3 times per gallery/sub gallery) and
this then becomes equally unmanageable....
So wonder if there's a "better/easier" way of achieving this so I can ultimately use a single piece of js on every page/throughout the site..?
Shout if you need more info and Thanks...
PaulSc
I have a local html/javascript based image gallery "website" used to display my digital pictures.
it uses a javascript menu/navigation bar which I have on all pages but with the "site" spread across multiple folder levels I'm having to maintain 3 copies of the js code
which as the site/number of pictures I take grows is becoming a pain...
My site is fairly basic in that its got
[pre]
website (Top level html main menu page - js here)
year1 (gallery index with the js menu here too)
htmlp1 (thumbnail pages again with the js menu)
htmlp2
year2
htmlp1
htmlp2
year3
htmlp1
htmlp2
htmlp3
...
year 17 etc
htmlp1
htmlp2
sitefiles
js
css
images
in the js menu I refer to base images, urls etc via href/src tags and currently use relative references
i.e src='sitefiles/images/image1.jpg'
however whilst 99% of the code is then identical for the 2nd folder level pages i have to use
src='../sitefiles/images/image1.jpg'
and the lower level thumbnail pages
src='../../sitefiles/images/image1.jpg'
[/pre]
JavaScript:
document.write(" <li><a href='2002/00_General/default.htm'> <img src='sitefiles/webimage/Odd_Small.png'> <b> 00: General 2002</b> - General Pictures <img src='sitefiles/webimage/close.png'></a></li>");
document.write(" <li><a href='2003/00_General/default.htm'> <img src='sitefiles/webimage/Odd_Small.png'> <b> 00: General 2003</b> - General Pictures <img src='sitefiles/webimage/close.png'></a></li>");
I know I can probably use something like src="file://d:/website/sitefiles/images/image1.jpg' but that just seems to cause it to grow in size (3 times per gallery/sub gallery) and
this then becomes equally unmanageable....
So wonder if there's a "better/easier" way of achieving this so I can ultimately use a single piece of js on every page/throughout the site..?
Shout if you need more info and Thanks...
PaulSc