• 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Javascript..

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to send back a value from a window to be filled in a text field which is in its parent's window using javascript.
I am able to acheive this in IE 5.0 and above by saying window.opener.document.<formName>.<fieldName>.value.
If I try the same thing in Netscape Navigator, it comes back with a error message saying 'window.opener has no properties.
Has anybody have an idea how to get around this problem.
Thank you very much if you can take a look at this and give me a hint.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This should work as long as you are opening the second document with window.open(). Usually IE is more lenient than Netscape, so you could be violating syntax and IE is just ignorning it.
Can you post the code you use to open the window, and also the code you are using to update the form?
 
Chuck Meduri
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for replying to this Connie..
I could not post the code as it is too complicated to post it here.
Anyway, I was able to solve by using eval(window.opener.document.<formName>.<fieldName>.value)
This worked in IE as well as Netscape.
 
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic