PDA

View Full Version : Target windows for Links


dog
06-01-2005, 12:22 PM
Hello kind people,

I'm having some trouble picking a target window for my links. i'm sure it can be done but I can't remember how.

Please take a look at www.dogcorp5billion.com/twtc/glossary/glossary.html (http://www.dogcorp5billion.com/twtc/glossary/glossary.html) and click on one of the none-active letters like 'H'. In this window there is a link to 'CONTACT'. I'd like CONTACT to open in the big window that currently holds GLOSSARY but I don't know how to do this.

if anyone can help that'd be sweeEET!

cheers,

dog

IKLOP
06-01-2005, 12:32 PM
you have to give the opener window a name so that the link can target it. this can be done easily in the onclick event<a href='contact.html' target='openerwin' onclick='opener.name="openerwin";'>CONTACT</a>

dog
06-07-2005, 11:42 AM
Thanks very muck IKLOP. Simple as that ay! This brings me to another area I'm stuck with...
could you tell me how can I get the 'NO ENTRIES' window to close after the link has done it's thing?
I've never known how to get windows to both close and do something reliably.

IKLOP
06-07-2005, 04:27 PM
I haven't tested it so I'm not sure if this will work, but you might be able to just add window.close() to the onclick event:<a href='contact.html' target='openerwin' onclick='opener.name="openerwin";window.close();'>CONTACT</a>It's possible that won't work. If not, try this:<a href='#' onclick='opener.location.href="contact.html";window.close();'>CONTACT</a> The second one should definately work. But it is all javascript, so if someone has js disabled, it wouldn't work at all, while the first method would atleast show contact.html.

dog
06-08-2005, 05:36 PM
IKLOP, thanx. That first method works a treat. If you need a hand with anything anytime just ask. I owe you one. I do Graphic Design, Illustration, Photomanipulation that kinda thing. peace out