SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    Los Angeles, CA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PopUp Dimensions Screwy

    My site's encased in a pop-up, and since I don't know JavaScript, well, at all, I got some script from one of the many JS sites out there. I'm having an issue with it, though. It seems that different browsers are rendering its size differently, which is a bit of a hassle. For instance, it's a few pixels too tall in Firefox, but in Safari its a few pixels too wide and too tall. So, uh, what's wrong with it?

    Code:
    function popUp(URL) {
     day = new Date();
     id = day.getTime();
     eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=550,height=450,left = 362,top = 159');");
    }
    
    (...)
    
    <a href="javascript:popUp('dLog.html')">Development Log</a>
    Looks messy to me, so if anyone wants to completely fix it up...

  2. #2
    SitePoint Evangelist vikrantkorde's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai, India
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as far as i guess this doesn't make any difference. It will be always partly relative but more or the same it will look a like.
    if it is not working then waht i can suggest is that you need to find the browser type and accordingly need to set the co-ordinates. This can be achieved from server side scripting as well as from java script. any ways you can do that.

    see if this works at all
    Vikrant Korde
    S Y S T I M E, Mhape,
    Mumbai, Maharashtra, India.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    Los Angeles, CA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For what it's worth, I did just that. ^^; I set what works for most browsers as default, and used if statements for any of the browsers that needed differeny values. Thanks.


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
  •