View Full Version : Open new browswer window in behaviours

06-17-2007, 04:22 PM
I have a page on my web site that I use "click to enlarge" for some of the photos, using behaviours / open new browser window. It works fine, and it looks goos ........ but all the windows stay open, so you have to close each one manually. Is there any way of getting them to close themselves automatically ???? The page is:


I'd be glad of any help.

06-17-2007, 04:42 PM
ok you have a nice clean site. Your thumbnails need an indicator to show they are clickable. The indicator is a pointing finger which you can produce using CSS

to close a window add this to the body tag of each popup window...

<body onload="self.focus()" onblur="self.close()">

06-17-2007, 06:00 PM
Thanks for that, but I'm a real thicko. How do I get the code into each popup window? Its not as if its a seperate page with its own code. I know I'm getting close here .... please reply (and talk to me like I'm the idiot that I am).

06-17-2007, 07:01 PM
you have to write this into the code

have you written code before?

have you edited a page in code view

06-17-2007, 08:15 PM
I'm certainly no expert with code, I've put the odd thing into the code before. I don't know how I would put it into the code for each pop up window. The pop up window hasn't got its own code has it? If so ... where? Is it in the behaviours panel? The pop up photo isn't on a seperate page so where is the code? HELP

06-17-2007, 08:18 PM
Is this the line of code where I insert your code ??

<img src="../images/No-2-gold-bedding.jpg" width="150" height="113" onClick="MM_openBrWindow('../images/Bedroom-2-500x375.jpg','','width=500,height=375')">

06-17-2007, 08:23 PM
ah ic what your doing. your linking directly to the image.

you need to create a popup window and insert the image in that.

06-17-2007, 10:39 PM
Now I'm lost. Do you mean every single photo has to be on its own page? with its own URL ? That could end up as a heck of a lot of files in my pages folder !

06-17-2007, 10:42 PM
yes im afraid thats the case

Its what you need to do to have control over your images

06-17-2007, 11:16 PM
Simmonds, why not do something like Thickbox instead?
It seems to be more the functionality you are looking for.

06-18-2007, 06:46 AM
i made a little javascript behavior at work a while ago and have tweaked it for what i think you might be after.

have a look at http://face2media.com/

then go to the images tab.

let me kno what u think and i can do a demo for u if u want

06-18-2007, 06:50 AM
heads up chris

your copyright is mis-aligned on your site in IE7

06-18-2007, 07:46 AM
Is there a way of making the cursor turn into a "pointing hand" when it hits a clickable photo?

06-18-2007, 08:28 AM
do it in CSS

do you know CSS? Have you styled your site using it

06-18-2007, 05:30 PM
Is there any way to turn a cursor into a "ponting finger" when it hits a clickable thumbnail ???

06-18-2007, 06:21 PM
You can appoint a pointing finger on anything through CSS.

for example:
.classname {cursor: pointer; cursor: hand;}

You can see I've declared the CSS cursor twice. This is due to some browser inconsistencies and will provide cross browser support.