Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Help on passing value from Parent window to Child

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a popup window and I want to pass a single value from my parent window to the child window. I tried the tutorial that Eric posted in his blog, http://radio.javaranch.com/pascarello/2005/01/18/1106063002000.html. I can send the data from the child to the parent, but when it comes for the parent window to send the data to the child window, it did not work. The script initially worked, but in the pop up window, there is this warning by the system regarding about the script. When I click ok to allow the script to run, the data was gone. I installed SP2 for my window.

Any idea on how to solve this? Thanks alot..
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem you are facing with the warning is your settings on your browser. SP2 locked down them.

To get rid of this:
  • open IE
  • click 'Tools'
  • click 'Internet Options'
  • click 'Advanced'
  • scroll down to 'Security'
  • check 'Allow active content to run in files on My Computer'
  • click 'Apply'
  • click 'OK'


  • If you do not want to change the setting(not sure why) after you click that bar to enable the script, you have to hit refresh for the page to run correctly.

    Eric
     
    Ferry Lukito
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi, thanks for the input. The scripts work well after I changed the IE setting. However using refresh button does not help at all. Also the scripts cannot be run on Mozilla. Any idea why is that so?

    Thanks alot....
     
    Eric Pascarello
    author
    Posts: 15385
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    What is the code you are running? Could you post it here?

    AlsoMozzila has a built in pop up blocker. If you are calling it onload, it will not show up.

    Eric
    [ April 27, 2005: Message edited by: Eric Pascarello ]
     
    Ferry Lukito
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The following is the code in the parent code:


    this code is for the pop up menu:


    The objective is to click on a thumbnail in the parent window and have a pop up window appear with the 1st picture displayed is the corresponding picture from the thumbnail. I cant think of any other feature other than onLoad to solve the problem.
    Thanks b4...
     
    Eric Pascarello
    author
    Posts: 15385
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Try this:



    Eric
    [ April 29, 2005: Message edited by: Eric Pascarello ]
     
    Ferry Lukito
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi, the code works in Mozilla now. However it does not really work in the IE.when i click on the pic, the pop up will initially show the pic. When i click on the warning alert to allow the javascript to run on the IE, the pic disappear. I tried to refresh, but it didnt work either. The functions, are however, working perfectly well. Thanks alot...
     
    Eric Pascarello
    author
    Posts: 15385
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    change your settings to enable the active content or test it on a server and not your local machine.
     
    Ferry Lukito
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yep it worked well after i uploaded it, but the strange thing is that when i test it again today, without any modifications to the files that I uploaded, it didnt work for both Mozilla and IE. I cant tell why. I tried to overwrite files on the host, but still it didnt work. I did some testing, it turns out that the popup function that update the source file did not work. I tried to refresh but still no effect...
     
    This will take every ounce of my mental strength! All for a tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
      Bookmark Topic Watch Topic
    • New Topic