View previous topic :: View next topic |
Author |
Topic : "Website question - new window problems" |
rdgraffix member
Member # Joined: 21 Jul 2000 Posts: 299 Location: Australia
|
Posted: Wed Aug 07, 2002 12:33 am |
|
![](templates/drizz/images/hrline.gif) |
Hi guys, I'm (finally) getting around to redesigning, & updating my website but I've run into a problem.
What I'm trying to do is have a new window for an image pop up when a thumbnail is clicked on, at a defined size (for example 500 x 500) and without navigation/toolbars and all that clutter.
Now, it's easy enough to set this up in Dreamweaver with Behaviors, but if I do it that way the visitor doesn't get a nice little hand icon when he goes over the thumbnail telling him that yes, if he clicks he'll go to a nice big pic. Does anyone know how to get around this problem?
Thanks in advance. |
|
Back to top |
|
Catfish member
Member # Joined: 23 Aug 2000 Posts: 127 Location: Reading, UK
|
Posted: Wed Aug 07, 2002 12:46 am |
|
![](templates/drizz/images/hrline.gif) |
Using javascript...
<script language="JavaScript" type="text/javascript">
<!--
function openpopup()
{
winpops=window.open("popup.htm")
}
//-->
</script>
Then, for your thumbnails, give them this link
<a href="javascript penpopup()"> |
|
Back to top |
|
Jabo member
Member # Joined: 25 Jul 2002 Posts: 467 Location: Germany
|
Posted: Wed Aug 07, 2002 12:51 am |
|
![](templates/drizz/images/hrline.gif) |
Add a new attribute to the img tag:
<img src="IMAGE URL" style="cursor:hand" AND THE REST OF YOUR SHIT>
For the text (click to enlarge), add another attribute:
<img src="IMAGE URL" style="cursor:hand" alt="click to enlarge" AND THE REST OF YOUR SHIT>
Hope I could help you... |
|
Back to top |
|
Mindsiphon member
Member # Joined: 24 Mar 2001 Posts: 446 Location: Nashua, NH
|
Posted: Wed Aug 07, 2002 7:37 am |
|
![](templates/drizz/images/hrline.gif) |
You need to specify the size of the new window on the page with the thumbnails.
Take a look at my code @
<A HREF="http://www.mindsiphon.com/art.html"TARGET=_blank>http://www.mindsiphon.com/art.html[/URL]</A>
Cheers!
[ August 07, 2002: Message edited by: mindsiphon ] |
|
Back to top |
|
Rat member
Member # Joined: 10 Feb 2002 Posts: 851 Location: Vancouver, BC, Canada
|
Posted: Wed Aug 07, 2002 8:55 am |
|
![](templates/drizz/images/hrline.gif) |
I was looking for this for quite a while (took me forever to find it), and what I found (that I rather like) is:
<A HREF="" onClick="window.open('[url/filename goes here]', 'newWnd', 'width=500,height=500,scrollbars=1'); return false;">blah blah blah</A>
A window with a scrollbar. That's it. |
|
Back to top |
|
Dekard member
Member # Joined: 01 Nov 2001 Posts: 274
|
Posted: Mon Aug 12, 2002 12:22 pm |
|
![](templates/drizz/images/hrline.gif) |
Cut and paste the same code from RAT below:
<A HREF="" onClick="window.open('http://www.prime-ape.com/images/involved.jpg', 'newWnd', 'width=500,height=500,scrollbars=1'); return false;">
<img src=images/involved_sm.jpg width="90" height="55"></A>
Just rename your pics there and it works.
Here's a sample of it in action: http://www.prime-ape.com/test.htm
Thanks Rat.. |
|
Back to top |
|
Herb member
Member # Joined: 06 Jul 2002 Posts: 78
|
Posted: Mon Aug 12, 2002 12:35 pm |
|
![](templates/drizz/images/hrline.gif) |
Does that work for images only then? Because what I was trying to do was have it open up a new window at a set size. |
|
Back to top |
|
Herb member
Member # Joined: 06 Jul 2002 Posts: 78
|
Posted: Mon Aug 12, 2002 12:40 pm |
|
![](templates/drizz/images/hrline.gif) |
Nevermind, I found it out:
<a href="url" onClick="NewWindow(this.href,'name','300','500','yes');return false;">your daddy</a> |
|
Back to top |
|
Gort member
Member # Joined: 09 Oct 2001 Posts: 1545 Location: Atlanta, GA
|
Posted: Mon Aug 12, 2002 5:41 pm |
|
![](templates/drizz/images/hrline.gif) |
<SCRIPT LANGUAGE=JAVASCRIPT>
<!-- Hide script from old browsers
function viewer(target)
{NewWindow = window.open(target, "Viewer",
"toolbar=no,scrollbars=no,height=475,width=475",
"status=no,resize=no,menubar=no,resizeable=no")
}
// End hiding script from old browsers -->
</SCRIPT>
then this ahref applied to image thumbnail (image1 housing your large image):
javascript:viewer('image1.htm')
You can see this script in action here - a very quick and dirty (meaning done while on vacation, so pardon the obvious errors) vacation log from last May: http://www.katelyncarter.com/disney/ |
|
Back to top |
|
Rat member
Member # Joined: 10 Feb 2002 Posts: 851 Location: Vancouver, BC, Canada
|
Posted: Mon Aug 12, 2002 7:27 pm |
|
![](templates/drizz/images/hrline.gif) |
quote: Originally posted by Herb:
Rat, that code you provided won't work for some reason...do you have an example of it working?
I use text links. Not images.
http://www.geocities.com/rat_662/stories/Stories.html
You apparantly figured it out, but I thought I'd toss this in, anyway, since you asked for it.
[ August 12, 2002: Message edited by: Rat ] |
|
Back to top |
|
Herb member
Member # Joined: 06 Jul 2002 Posts: 78
|
Posted: Mon Aug 12, 2002 11:37 pm |
|
![](templates/drizz/images/hrline.gif) |
Rat, that code you provided won't work for some reason...do you have an example of it working? |
|
Back to top |
|
Max member
Member # Joined: 12 Aug 2002 Posts: 3210 Location: MIND
|
Posted: Mon Aug 19, 2002 6:54 am |
|
![](templates/drizz/images/hrline.gif) |
I am not sure if this can help you but sometimes you just have to write a # in Link in the proporties bar. If there is no # ,no hand will appear when the visitor scrollsover your image.
maybe that helps.....
- max
[ August 19, 2002: Message edited by: Max Kulich ] |
|
Back to top |
|
ceenda member
Member # Joined: 27 Jun 2000 Posts: 2030
|
Posted: Mon Aug 19, 2002 7:21 am |
|
![](templates/drizz/images/hrline.gif) |
Just a small point about the window.open() function.
If the viewer of your website is on a slow connection (56k) and clicks on one of the thumbnails before they've all downloaded, then the browser will stop downloading the rest of the thumbnails.
I don't think IE6 fixes this yet. Seems to be a javascript thingy. |
|
Back to top |
|
|