www.webdeveloper.com
Results 1 to 7 of 7

Thread: Script for a pop up window

  1. #1
    Join Date
    Mar 2003
    Posts
    25

    Question Script for a pop up window

    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!

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    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>

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  3. #3
    Join Date
    Mar 2003
    Posts
    25
    Thanks, Pyro.

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

  4. #4
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    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.

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  5. #5
    Join Date
    Mar 2003
    Posts
    25
    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!

  6. #6
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    The script will open yourpage.htm in a new window. So, you just put you picture and text on that page.

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  7. #7
    Join Date
    Mar 2003
    Posts
    25
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles