SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    ********* Ornithologist AtomicPenguin's Avatar
    Join Date
    May 2002
    Location
    Vancouver, BC
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    setting child window form values from parent window.

    Hey all!

    Silly little problem - what's the syntax for setting child window form values from it's parent window? I'm a little curious to know why this won't work:

    var newWin = window.open( ... );
    newWin.document.forms[0].fieldname.value = "new value";

    Doesn't a parent window have full control over a child window?

    Thanks guys :-)

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hm, looks okay to me - but just as with a single document environment (no popup) the document has to be fully loaded before you can access the elements
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    ********* Ornithologist AtomicPenguin's Avatar
    Join Date
    May 2002
    Location
    Vancouver, BC
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, maybe I'll try playing around with putting a timer on the value setting. Thanks for the response :-)


Bookmarks

Posting Permissions

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