Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Popups - return values and waiting

    I've created a website that steps through a series of questions using showModalDialog in IE. Now the sponsor for the project wants interoperability in Firefox. It's not really feasible to change the setup of the entire page; what I need to do is use window.open and not only get the return value but wait for it without doing an infinite loop (i.e. while (!windowReference.close).

    Any ideas?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,592
    Thanks
    0
    Thanked 645 Times in 635 Posts
    See http://javascript.about.com/library/blmodald1.htm for an alternative way to create modal dialog boxes that is not specific to one browser and which doesn't require a loop to wait for the result.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, that is actually perfect for what I am doing. I'm running into one small problem, however. When I copy the code into my own files for running, I get an error, supposedly on line 8 (a blank line) charcter 1706. The error tells me that 'null' is null or not an object. After some searching, I've come to the conclusion that it must be the null in the modaldbox.js file he provides. What am I missing that is causing this null to be invalid? It clearly works on his page, so I assume there is something I just don't know to do at work here. Again, thanks for the help.


  •  

    Posting Permissions

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