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 5 of 5
  1. #1
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts

    Data Transfer Between Windows

    Having two popup windows and a main window how is it possible to tranfer data from the main window into the popups and possibly from the popups to the main window.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Depeding on the type/nature/quantity of data, you have limited options. Using cookies may be the best way.

    What are you trying to accomplish?

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    I require that the results from a number generator are viewed in a popup

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, if you are calculating the value in opener, you can pass the value to the popup with the query string (or search string)
    Code:
    var randNum = Math.floor(Math.random() * 100); // Or whatever
    var nUrl = 'popup.htm?' + randNum;
    window.open(nUrl,'','');
    then, in the popup, get the number like this
    Code:
    var randNum = parseInt(top.location.search.substring(1));

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    I will work on that.

    Thank You


  •  

    Posting Permissions

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