SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript POPUP

    Hi

    I need a JAVASCRIPT Popup for 500x330. For example If i click a link, that POPUP will come and will load a HTML file. please guide

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,048
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    js popup

    I advise against using a pop-up unless well justified. Better to make a link with target="_blank" or better yet, let the user decide. There's a reason pop-up blockers are so popular. But if you insist you could use something like this:
    window.open('url_here','name_here','parameters_here');

  3. #3
    SitePoint Enthusiast navtej's Avatar
    Join Date
    May 2006
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zeeshanhashmi
    Hi

    I need a JAVASCRIPT Popup for 500x330. For example If i click a link, that POPUP will come and will load a HTML file. please guide
    Hi zee

    I think if you use a div with visibility false,with the required text , and on the click making the visibilty true will do the effect of as a pop up.

    eg in javascript: document.getElementById("your_div_id").style.visibility="visible";

    thanks

    navtej

  4. #4
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wud u please let me know how to open a Specific size Windows (_blank) and POPUP ? like i want to open a window for Width = 500 and Height = 330

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,048
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    window size

    Using target blank opens a new browser window that the user can resize to their needs. This is best for new pages that contain text, as using specified dimensions may not be correct for a user's text-size settings. It depends on what you have in the new window. IMHO about the only justifiable reason for using a pop-up is to provide parallel comparison. That is, if you have a process that requires several screens to get through, and the user would benefit from having a seperate window with the step-by-steps. I have 1 pop-up window on my site that I use window.open() for. It's for an image that has fixed pixel dimensions. I have it open without a menubar, statusbar, or scrollbars. It's not resizable and has fixed dimensions. Generally these are qualities that make pop-ps annoying to users. If you are opening anything other than a fixed dimension image, you should provide the user those options. Come to think of it, if a user at my site decides to "zoom in" the image, they will need the resize option and/or scrollbars, time for me to change that I have a few external links on the site where I use target="_blank" so users can see related information without losing their place. Whatever technique you use you should ensure the user is aware that a new window will open so they won't be "surpised", pleasantly or otherwise.

  6. #6
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually I want to open Google map through API in the new windows and the diemention would be 500 x 330. So its fixed diemention and if user ZOOM then u know that it will not change the diemention.

  7. #7
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,048
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    google map

    Actually, I meant the browsers right-click zoom, not a google maps "zoom" feature. Using window.open for this would be OK, but I would still use resizable=yes, scrollbars=yes in the parameters just in case.
    Off Topic:

    BTW, I just changed my map pop-up to these a minute ago

  8. #8
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can u give me the code to open such a window with 500x 330 plz ?


Bookmarks

Posting Permissions

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