navwin » Tech Talk » How Do You Spell HTML? » another window
How Do You Spell HTML?
Post A Reply Post New Topic another window Go to Previous / Newer Topic Back to Topic List Go to Next / Older Topic
JOY 14
Senior Member
since 1999-09-22
Posts 1419
Wisconsin USA

0 posted 2001-03-06 12:25 PM


I'm working, rather updating my web page. I want to know what code to put in to get another window to pop up.

For instance...

Here's a link to another website on the page

Bill's Barbershop Online

I don't want the link to take over my page. Are you following me so far? I want a new window for Bill's to pop up.

Can anyone help?
Thanks
Joy

© Copyright 2001 Kristen Joy Jacobus - All Rights Reserved
Christopher
Moderator
Member Rara Avis
since 1999-08-02
Posts 8296
Purgatorial Incarceration
1 posted 2001-03-06 04:15 PM


Hi Joy, probably the simplest and most effective way to pop up a new windw (if you're not particular about how it pops up and what size, et al) is to include it in your link tag:

<a href="http://www.barbershop.com/bill" target="_blank">Bill's Barbershop Online</a>

and there ya go!


Christopher

WhtDove
Member Rara Avis
since 1999-07-22
Posts 9245
Illinois
2 posted 2001-03-06 05:52 PM


Actually Chris mine is about the same. I'm sure it doesn't matter, but this is the way I was just taught.

<a href="http://www.barbershop.com/bill" target="_new">Bill's Barbershop Online</a>

Only difference being they taught me to do _new.

Christopher
Moderator
Member Rara Avis
since 1999-08-02
Posts 8296
Purgatorial Incarceration
3 posted 2001-03-06 06:50 PM


Yes Becca, there are several ways to do it. Among them are: "_self" "_parent" or you can always "name them" ie: "_window1" "window2" etc. This is used if you want new windows to replace one you've already popped up.



C

Ron
Administrator
Member Rara Avis
since 1999-05-19
Posts 8669
Michigan, US
4 posted 2001-03-06 06:58 PM


What your teacher has essentially done, Becky, is name the new window _new. That's what is really happening with the TARGET attribute. It says, "open this link and put the stuff HERE." There are a few names, however, that have special significance, and all of those start with the underscore character. It's really kinda bad form to use _new (it's not a magic name), but a lot of people do it.

The magic names are:

TARGET="_blank"
This target will cause the link to always be loaded in a new blank window. This window is not named.

TARGET="_self"
This target causes the link to always load in the same window the anchor was clicked in. This is useful for overriding a globally assigned BASE target.

TARGET="_parent"
This target makes the link load in the immediate FRAMESET parent of this document. This defaults to acting like "_self" if the document has no parent.

TARGET="_top"
This target makes the link load in the full body of the window. This defaults to acting like "_self" if the document is already at the top. It is useful for breaking out of an arbitrarily deep FRAME nesting.

To the best of my knowledge, those are the only magic names. Anything other than those becomes the name of the newly opened window (which is useful if you want to continue sending stuff there).

WhtDove
Member Rara Avis
since 1999-07-22
Posts 9245
Illinois
5 posted 2001-03-06 09:15 PM


I just keep on learning. :>

I'm going to print this and put it with all my other notes. Thanks you two!

Brandon
New Member
since 2001-03-04
Posts 5
Pennsylvania
6 posted 2001-03-07 12:34 PM


oh my, i thought i knew almost everything about HTML..

..now i know more.

-brandon

JOY 14
Senior Member
since 1999-09-22
Posts 1419
Wisconsin USA
7 posted 2001-03-07 03:01 PM


Thank you. I'm off to try it now.

Joy

quietlydying
Deputy Moderator 1 TourDeputy Moderator 1 Tour
Senior Member
since 2001-06-10
Posts 935
the wonderful land of oz
8 posted 2002-10-21 01:50 AM


i'll try again in a bit.  heh.  i think i've permanently messed this one up.  heh.

/jen/

[This message has been edited by quietlydying (10-21-2002 01:55 AM).]

quietlydying
Deputy Moderator 1 TourDeputy Moderator 1 Tour
Senior Member
since 2001-06-10
Posts 935
the wonderful land of oz
9 posted 2002-10-21 01:56 AM


it makes good sense to turn the html off in an html forum.  

unfortunately i didn't notice that at first,
and used some xmp codes.  whoops.  
i closed them, but it made things a little crazylike.  heh.

on to the reply...

the easiest way to open up in a new window is:  

<a href="http://linkgoeshere.html" target="new">

you don't need the underscore.  just less to
remember.  and there's one thing not mentioned
above which is a nice little extra.

when you want to open a link of your own in a new
window...  

for example, my new layout is done with tables.  
i don't have the convenience to open something
in a small inline frame or anything.  
so i open it in a new window without any of
the tool bars and it isn't resizable.

i use a quick little java script that doesn't require anything in the head code.

<a href="#" onclick="javascript:newwin=window.open
(YOURLINKGOESHERE.html','PopupTest','toolbar=no,
location=no,directorie=no,status=no,menubar=no,
scrollbars=yes,resizable=no,copyhistory=yes,
width=403,height=451')">

only edit that in capital letters and the size.  
if you do get comfortable with it over time,
then you can play around a bit.  but if you're unsure and edit the wrong target, it won't work.

the size is in pixles and you can make it any
size you want.  

i use this code a lot and i really enjoy it.  
very simple java for those not very well read
in the field.

/jen/
to give pleasure to a single heart by a single act is better than a thousand heads bowing in prayer.  [ghandi]

[This message has been edited by quietlydying (10-21-2002 01:59 AM).]

Post A Reply Post New Topic ⇧ top of page ⇧ Go to Previous / Newer Topic Back to Topic List Go to Next / Older Topic
All times are ET (US). All dates are in Year-Month-Day format.
navwin » Tech Talk » How Do You Spell HTML? » another window

Passions in Poetry | pipTalk Home Page | Main Poetry Forums | 100 Best Poems

How to Join | Member's Area / Help | Private Library | Search | Contact Us | Login
Discussion | Tech Talk | Archives | Sanctuary