yellowlefttop.gif Bloggers yellowtopright.gif
spacer.gif Audrey
yellowmidleft.gif Archives yellowmidright.gif
spacer.gif August 2001
September 2001
yellowmidleft.gif Et Cetera yellowmidright.gif
spacer.gif Mean Makeover
CT Selector

Powered by Blogger

yellowbottomleft.gif spacer.gif yellowbottomright.gif
yellowlefttop.gif Star-Kitty.Net yellowtopright.gif
spacer.gif Okay, I'm going to try and explain the coding as best I can. ^_^ Anything in red is something that you can change to fit your needs.

<script language="JavaScript">
function blastoff() {"index2.htm","index2win","height=391,width=488,directory=no,toolbar=no,resizable=no,location=no,status=no"); }
function wrc() {"wrc.htm","wrcwin","height=291,width=253,directory=no,toolbar=no,resizable=no,location=no,status=no"); }
function updates() {"updates.htm","updateswin","height=291,width=253,directory=no,toolbar=no,resizable=no,location=no,status=no"); }
// -->

That goes in between <head> </head> I usually put it right before </head> That one's for multiple pop ups, but you can probably see the patern to add more windows or remove some. If you just want one pop up, just remove the other two functions. The function (the word before the parentheses) can be whatever you want it to be, but the word that goes before "win" has to be the same as the file name the function calls (only without the .htm or .html extension).

The value of the height and width determines the size of your window in pixels. I'm not sure what directory does. I usually keep it set on "no" but I tested it to see what would happen if I chose "yes" for directories. I didn't notice a difference.

If toolbar is set to "yes" you'll have access to the toolbar buttons, such as back, forward, refresh, stop, etc. If you're wanting the pop up for webrings or adoptions, I wouldn't worry about this variable and just leave it on "no"

If the pop up is for a layout, always set resizable to "no" for design purposes, especially if the layout is composed of frames and/or cut up/spliced images. If it's just for adoptions or something, I wouldn't really worry about it.

If location is set to "yes" you'll be able to see the address bar. I'd leave this as "no" since it's doubtful that anyone is going to type in an URL to website that can't possibly fit in the pop up window.

And the last option is status. If "yes" the status bar will be shown, which is the bar at the bottom of your browser. It shows the URL when you put your mouse over a link.

Okay, now, the easiest part of the pop up window. Linking to it. ^_^
Let's say we want to link to my first function, which is blastoff. It starts out the same way as a normal link, but instead of the URL in the <a href=""> it would be javascript:blastoff(), so the resulting code is <a href="javascript:blastoff()"> Don't worry about targeting that link to anything. If it is targeted, the pop up won't work.
You can still add other attributes to the tag like the mouse over text in the status bar and titling the link. So you could use <a href="javascript:blastoff()" title="lalala" onmouseover="window.status='lalala'; return true;" onmouseout="window.status=defaultstatus">
Your link text would follow, or you can use an image to link to the pop up the same way you would any other link. And, as always, after your link text or image, you'd close the tag with </a> ^_^ I think that covers everything. Email me if there's anything you don't understand or if I've confused you. ^_^

Whoops! I almost forgot, well, actually I did forget, but you know what I mean. ^^;;; Whenever you're linking to another site from the pop up, always target the link as "new" or "blank"

yellowbottomleft.gif spacer.gif yellowbottomright.gif