|
-
Nov 26th, 2000, 04:55 PM
#1
Thread Starter
Lively Member
I want to have a thumbnail view of images, and then when they click on the image it opens a seperate window with the larger image in it. From examples I have seen with javascript, it can open an html page fine, but not the image directly. Can anyone help?
-
Nov 26th, 2000, 07:39 PM
#2
Hi,
I dont think you can open an image directly(without any html) on a browser. That will only work if they users have selcted Internet Explorer as their defualt viewer for those image types.
You can put the larger version of the image in a html file and load that when users click on the thumbnail.
Hope this helps.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 26th, 2000, 09:07 PM
#3
Why don't you use HTML to control and images HEIGHT and WIDTH properties for a thumbnail. And you can use JavaScript to open it in new page and view it in that page with the image an original size.
Just change to fit your needs.
Code:
<SCRIPT LANGUAGE="JavaScript">
function openIMG(){
windowOpen=window.open("",'Open','toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=1,width=420,height=420');
windowOpen.document.writeln("<head><title>Image</title></head><body>");
windowOpen.document.writeln('<img src=http://www.mysite.com/mygif.gif border=1>');
windowOpen.document.writeln("</body></html>");
}
</SCRIPT>
And in the image:
Code:
<a href="javascript:openIMG();">
You can always assign openIMG(MyIMG) like so you can use it over and over again.
You basically get the idea, I hope.
-
Nov 27th, 2000, 12:44 AM
#4
Thread Starter
Lively Member
Thanks Matthew, thats just what I was after :-)
-
Jul 17th, 2008, 05:23 AM
#5
New Member
Re: Open Image in seperate window
Help!
I have finally figured out how to enter the script above (THANKYOU) and have got my thumbnails to open a larger image in a new window. BUT..... I have several thumbnails, (for which I have used the same script) - and they are all showing the image (in the new window) of the last thumbnail.
Are you able to explain what is meant by "openIMG(MyIMG)" in simple terms!???
This is frustrating!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|