By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,944 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,944 IT Pros & Developers. It's quick & easy.

passing data between windows on javascript/IE7

P: 5
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. ('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"/>
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> 
note: on IE7 doesnt work :
Expand|Select|Wrap|Line Numbers
  1. window.opener.document.getElementById("ID").value=valor;

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

Sep 4 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 849
You're in the wrong forum, this should be in the JavaScript forum.
Sep 4 '08 #2

Expert Mod 15k+
P: 16,027
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.
Sep 5 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.