jordanmerrick
05-28-2009, 01:27 AM
Hi - I'm a bit of a newbie with regards to javascript but am really starting to bury my head in a few books and am thoroughly enjoying it.
I'm using an image gallery generator that creates a page for each photo. For example,
<div id="pictures">
<a href="image001-large.html"><img src="image001-small.jpg"></a>
</div>
However, all image001-large.html contains is an <img> tag for image001-large.jpg. I'd rather the link be as follows
<a href="image001-large.jpg"><img src="image001-small.jpg"></a>
So I just want to change the .html of the link to .jpg. Rather than change each page manually after creation I'm wondering if there was a way to change the links using javascript? the software I'm using will allow me to add to the <head> section of the pages generated. That way, the links would be direct to the large image and not the generated html file (that way I can use something like greybox or Slimbox to display the images)
Any help would be greatly appreciated!
I'm using an image gallery generator that creates a page for each photo. For example,
<div id="pictures">
<a href="image001-large.html"><img src="image001-small.jpg"></a>
</div>
However, all image001-large.html contains is an <img> tag for image001-large.jpg. I'd rather the link be as follows
<a href="image001-large.jpg"><img src="image001-small.jpg"></a>
So I just want to change the .html of the link to .jpg. Rather than change each page manually after creation I'm wondering if there was a way to change the links using javascript? the software I'm using will allow me to add to the <head> section of the pages generated. That way, the links would be direct to the large image and not the generated html file (that way I can use something like greybox or Slimbox to display the images)
Any help would be greatly appreciated!