A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Oh PLEASE help me out of popup hell.

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Posts
    2

    Oh PLEASE help me out of popup hell.

    I have been at this problem for over 2 months now. I have tried every code I could find online. Please help me out before I crack and toss my computer out the window.

    I want to make a popup that works cross-platform. I need it to be a certain size. I have done this before, and it worked- on both PC and mac. I used the same code again, and now it doesn't work. All that happens is the screen flashes, no popup (with Mac. IE 5.0). Here's the coding I used (that did work before...):

    JavaScriptpenWindow("popup.html", "150", "150")


    and in the HTML head tags:

    <script language="JavaScript">
    <!-- hide from JavaScript-challenged browsers

    function openWindow(url, w, h) {
    var windowprops = "width=" + w + ",height=" + h;
    popup = window.open(url,'remote',windowprops);
    }

    // done hiding -->
    </script>


    I've tried window.open, openWin, popWindow.. etc. etc. etc. Some only worked on Macs, and not PCs. Some worked on PC, but not Macs. Some refused to resize my popup. Most didn't work at all- the page just flashes. The following code worked great- except on PC's, after the popup appears, the original page dissappears, and the coding for some reason ends up in the address where the regualr URL should be..:

    javascript:NewWindow=window.open('popup.html','new Win','width=375,height=500')......and I was soooo close too....

    I'm not sure what I'm doing wrong, but I figure it's the javascript.

    Please help me out- I'd really appreciate it.

  2. #2
    Senior Member SJT's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    2,563
    Code:
    javascript:NewWindow=window.open('popup.html','newWin','width=375,height=500'); void(0);
    That should work.
    Code:
    void(0);
    stops javascript returning any values to the browsers (which is what is happening).
    Sam



  3. #3
    Junior Member
    Join Date
    Aug 2003
    Posts
    2

    my hero....

    You saved my sanity... thankyouthankyouthankyou.

    My site can finally be DONE.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center