PDA

View Full Version : Link with two targets?


Klas
01-15-2006, 09:19 AM
Hello!

On my page, I've got two frames. The first contains a clickable thumbnail picture.
When clicking it, I want the following two things to happen:

- A new window opens, containing the picture in full size. I want to set the size for this window myself.

- A new document is opened in the second frame.

I use HTML coding and I do not know JAVA coding. I've found java script on the internet, though, which I have copied and pasted to my html-files. This way I have managed to let a link open a new window with a size determined by me.
I've also managed to let a link open two documents in two separate frames.
What I haven't managed to do is the combination of the two: Letting one document open in another frame, the other in a window sized by me.

Anyone?

transmothra
01-15-2006, 09:29 AM
use JavaScript in the 2nd frame to open the pop-up window using onLoad="functionName(path/to/file.html)".

Klas
01-15-2006, 12:26 PM
Thanks a lot, Transmothra!

I wasn't sure exactly what to do with the script you provided (Java newbie), but all I really needed was your suggestion that clicking the link should open the other frame, wich in it's turn launches the popup. I used another script I got from somewhere else:

<script type="text/javascript">
// <![CDATA[

window.open('imagename.jpg', '', 'width=420,height=546,scrollbars=no');

// ]]>
</script>
and it worked.

A follow-up question:
What about pop-up blockers? They will prevent the popup to open since it launches when a page opens, not when the link is being clicked, right?

Can I get the pop-up to launch from the clicking of the link first, and the new document to open in the other frame second instead? In that case, how do I do it?

Klas

Klas
01-15-2006, 03:27 PM
Additional information:
I realize I really need to have this done the other way around (popup first, change of document in the other frame next) because elsewhere in the first frame there is another link that is supposed to open the new document in the other frame ONLY, not the popup.

Any help is HIGHLY appreciated!

Klas