SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2003
    0 Post(s)
    0 Thread(s)

    JavaScript for Pop-ups from Flash

    I'm new to the forum and posted this message in the wrong area -- I think... It may show up twice on in the main area -- sorry about that. I'll know better the next time.

    I recently used the JavaScript generously provided by SitePoint to launch pop-up windows from my Flash site.

    It works great on my system but when it's out there on the net a couple of issues exist.

    The first is the issue of screen display size. My display is set to 1024 x 768. I sized and positioned the pop-up (which I use as a video player) to: width=700, height=360,left=145,top=110. This works great on my display. I checked the site using a display setting of 800 x 600 and (of course) the pop-up window is much larger (this I don't mind so much) and it bleeds off the screen to the left (this really bugs me). I know that the settings for width and height I am using are causing this issue.

    Here's two possible work arounds I would like to ask about.

    1. Is there a "sniffer" that I can use to determine the screen size of a visitor to my site that can be interractive with JavaScript with a variable statement?

    2. Failing the "sniffer" idea ... can I set the width and height settings in JavaScript to universally center the pop-up instead of left/top settings?

    The second issue is puzzling. I have included: toolbar=no, menubar=no,location=no,status=no,resizable=no,scrollbars=no in my JavaScript (in the "Actions" of Flash). On my system, the window pops up with my html design placed perfectly wall to wall within the pop-up and the window can't be sized. This is exactly what I want.

    When I view the site on other computers (PC and Mac) the pop-ups appear (on screen displays set to 1024 x 728) perfectly -- with two exceptions: The pop-up window can be sized by dragging the corner of it with the mouse (thus exposing ugly ragged edges of my design) and the html design is not wall to wall within the window -- the user is forced to resize the window to see some of the buttons I've included to control the video.

    OK enough babbling...

    Anyone got any solutions?

  2. #2
    SitePoint Wizard silver trophy Crazybanana's Avatar
    Join Date
    Mar 2003
    In tha fruit cellar
    32 Post(s)
    1 Thread(s)
    i dont know if i got this right but i use this on one of my pages and it works perfect.
    i have it in an html document but without ANY html tags in it. just the script code, if there ANY other code in the html file it wont work. so try to past the code into notepad and save it as a html document and put a link to the document in your code.. and change the blah.htm to your own page.

    NFW ="","popFrameless","fullscreen"); NFW.blur(); NFW.resizeTo(550,400); NFW.moveTo(100,100); NFW.window.location="blah.htm"; window.focus();

    hope this can help..
    Who's to doom when the judge himself is dragged before the bar


Posting Permissions

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