Forum Moderators: open
<a href="fans/fan1.jpg" onclick="window.open(this.href,this.target,'width=350,height=350');return false"> lilac/White</p></a>
sue
I want to the code to be inside the above is this possible.
It's not possible if you link directly to the image, but you won't need to create a page for each image. Just one "wrapper" page, so to say.
Hopefully you have PHP available to you. If so, here is a quick and easy script:
<html><body>
<img src="<?php print $_GET['img'];?>" /><br />
<button onclick="window.close()" value="Close Window" />
</body></html>
Let us know if it works out or if you don't have PHP. There are other methods.
Birdman
BTW will be a regular visitor hear I expect need lots of help.
BTW will be a regular visitor hear I expect need lots of help.
Very good! You're in the right place for sure. I started as a newbie right here myself.
The red box(X) means that it tried to display an image but it was not there. This is good because it means you have PHP, you just entered the image path wrong.
Let's say your image was here:
yoursite.com/images/img.jpg
The path would be:
/images/img.jpg
Now, all you have to do is change the links in your HTML pages to point to the new script. Be sure to use root-relative paths (ie. /this_is_root/folder/image.jpg). Here is an example:
<a href="/images/myimage.jpg" onclick="window.open('/img.php'+this.href,this.target,'width=350,height=350');return false"> lilac/White</p></a>
Give that a run and let us know if there are any probs.
Cheers
It looks like you forgot one essential:
<a href="/images/myimage.jpg" onclick="window.open('/img.php?img='+this.href,this.target,'width=350,height=350');return false"> lilac/White</a></p>
And susie, you have your </p> inside the </a>
It looks like you are using XHTML, which is good... just don't forget that as XHTML is HTML in XML, and XML is a rigid markup language, that doing so is illegal.
By that I mean, that whereas in HTML
<b><i>Text</b></i>
was the same as
<b><i>Text</i></b>
now it isn't. The first is wrong, the second is right.
If in doubt, the prettier one is always the better!
Oh, and as a side note (purely personal), I hate links which encompass trimmable spaces or punctuation.