Click to See Complete Forum and Search --> : Script for a pop up window


newbie2003
04-24-2003, 02:26 PM
Does anybody know of a good script (that's fairly simple:) for a small....300x400...pop up window that can be edited?

For ex: it would be used for mini-flyers for upcoming events.

The position of it really doesn't matter, but I'd kinda like it either on the top left of the page or bottom left.

Thank you for your help!

pyro
04-24-2003, 05:21 PM
This is a javascript question, but here is your answer:

<a href="yourpage.htm" onClick="window.open(this.href,'pagename','width=300,height=400,left=0,top=0'); return false;">Open popup</a>

newbie2003
04-25-2003, 10:45 AM
Thanks, Pyro. :)

I tried it and got an error: "unterminated string constant". I'm not sure what that means...maybe I did it wrong.

pyro
04-25-2003, 10:59 AM
It works for me, but you have to remember to put all the code that I posted on one line. The forums just broke it when I posted.

newbie2003
04-26-2003, 01:40 AM
I got it to work this time:)

How do I put in the info (text and small pic) into the window?

I'm an amateur.....thanks, Pyro!

pyro
04-26-2003, 09:19 AM
The script will open yourpage.htm in a new window. So, you just put you picture and text on that page.

newbie2003
04-26-2003, 12:44 PM
It looks great, but it doesn't pop up when the page loads (maybe it wasn't scripted for that) and when you click on the popup link, it shows up, but has the background of my page on it....so it's like a mini version of the page it's self.