PDA

View Full Version : image in new window


bob_pitbull
Thu 16th Aug '01, 6:17am
On my webpage I'd like thumbnail pics to link to larger versions of the pics, which should open up in a new window, preferably with no border, options or title, sized exactly to fit the large image, with "Close this window" underneath the pic...

Does anyone know a good way to do this? I have it working almost using a Javascript routine, but still have the title + resizing buttons... All thumbs link to .html files, one for each pic... (I guess PHP would be a better way, but I've not started learning that yet - that's my next task..).

Thanks for any help,
Bob

bob_pitbull
Thu 16th Aug '01, 6:17am
Alternatively, can anyone send me links to sites that use thumbnails in similar ways, or in other nice ways?

b00t uP
Thu 6th Sep '01, 12:15am
Search any java site for javascript pop up codes.

They have built in options for sizes, no borders, no title, etc.

scoutt
Sat 6th Oct '01, 8:33pm
search for chromeless or containerless windows. I would post some code but it is rather lengthy. :)

Hondastyle
Mon 8th Oct '01, 12:36am
Well according to the date in the original post, there's no telling if this will still be useful, but here's a useful little tidbit I picked up along the way somewhere... (replace the bold values with your own custom values)



<a href="#" onClick="InfoWindow=window.open(yourpage.htm','InfoWindow',
'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no,
resizable=no, width=300, height=280, left=160, top=360'); return false;">


I haven't used this in a while, but I believe the left and top values indicate where the window displays on the screen. Play around with the no values too ;) (i.e. menubar, scrollbars, etc)

Also...

To add a close button to your pop up window:
In your pop up window document, add the following code:


<input type='BUTTON' value='Close'onClick='self.close()' name="BUTTON" class="button">



I have a really bad memory, so I keep a text file for any useful scripts I find that I think I may need later on... This would be one of them. Hope it helps.

Chris