Connecting Tech Pros Worldwide Help | Site Map

passing data between windows on javascript/IE7

  #1  
Old September 4th, 2008, 07:37 PM
Newbie
 
Join Date: Sep 2008
Posts: 1
Hi masters, (excuse my english)

I hope you could help me with this...

I´m working with visual studio 2005 on IE7 (I think this the origen of my problem because on IE6 worked fine)...and I'm making a page which opens a popup window (window1)… on this popup, after some filters follows by a button… on the click... runs a javascript... I need the source window1 gets the values from the popup window (window2)...
here is the example

window 1:

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function opener() {
  3.     window.open ('window2.aspx',"X","scrollbars=yes,status,width=450,
  4. height=450,top=0,left=0");
  5.             }
  6.     </script>
  7. ...
  8. <input id="ID" runat="server" name="ID" class="input_texto"/>
  9.  
window 2.aspx:

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" >
  2.         function Sel(valuex) {
  3.             window.parent.document.forms(0).item("ID").value=valuex;
  4.             window.close();
  5.         }
  6.     </script> 
  7.  
note: on IE7 doesnt work :
Expand|Select|Wrap|Line Numbers
  1. window.opener.document.getElementById("ID").value=valor;
either


do yo have any idea about it?
or something else ?

Regards...

Last edited by acoder; September 5th, 2008 at 11:44 AM. Reason: Added [code] tags
  #2  
Old September 4th, 2008, 10:44 PM
Expert
 
Join Date: Sep 2007
Posts: 857

re: passing data between windows on javascript/IE7


You're in the wrong forum, this should be in the JavaScript forum.
  #3  
Old September 5th, 2008, 11:48 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,528
Provided Answers: 12

re: passing data between windows on javascript/IE7


Do you get any errors? What does this line
Expand|Select|Wrap|Line Numbers
  1. <input id="ID" runat="server" name="ID" class="input_texto"/>
turn out in the browser? Is the ID still ID when you view the source in the browser?

PS. please use code tags when posting code. See How to Ask a Question. Thanks.
Reply