dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Need Help w/ Popup

  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Need Help w/ Popup

    I have just made the site below live, but have several questions about popups:

    http://www.innessjewelrydesigns.com/...necklaces.html

    And the script that was suggested:

    <a href="javascript:newWin=void(window.open('gallery-popup-neck/555N-neck-full.html','newWin','status=1,width=660,height=350,top=100,left=100'))">

    1. How can I set the script to open the gallery pop-up _in front of_ the main window when clicking on other thumbnails?

    2. Is it possible to be able have more than one window open, ie, a visitor can click on multiple thumbnails resulting in several popup windows open simultaneously?

    Thank you, -Pai

  2. #2
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    don't put javascript in the href as a lot of it wont work properly from there - put it in the onclick instead and get rid of the javascript: label.

    To make sure that the window opens in front you need to use:

    var newwin = window.open(....)
    newwin.focus();

    Since most popup blockers only allow popups to open when they are specifically requested to be opened by your visitors any attempt to open more than one will more than likely mean that they all get blocked.

    See http://javascript.about.com/library/blpopup8.htm for my thumbnail image script which will reuse the same popup as your visitors click on different images.

  3. #3
    Join Date
    Apr 2006
    Posts
    2

    Please Clarify

    Is this what you meant:

    <a href="javascript:newWin=void(window.open('gallery-popup-neck/555N-neck-full.html','var newwin = window.open(gallery-popup-neck/555N-neck-full.html)','newwin.focus();','status=1,width=660,height=350,top=100,left=100'))">

    I think I am missing something. IE reports an error & FF opens a window to the wrong dimensions. Also tried using the code for the multiple popups w/ even less success.

    Help! -Pai

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