Solved

ASP.Net 1.1 and Javascript popup window posting text back to parent

Posted on 2007-03-26
2
292 Views
Last Modified: 2008-03-17
I have a ASP.Net application that open a form using the following code:

window.open('zoom.aspx?hqk=" & utQuestions.SelectedNode.DataKey & "','','width=620, height=250');
return false;

That works just fine and passes in the Key no problem.

After changes were made in the popup - I ran a SQL UPDATE and that worked fine. However, the window.opener.location.reload() would cause the parent form to submit back to the database and therefore overwrite the information from the ZOOM box.

So it looks like the best solution is to use:
window.opener.document.getelementbyid('UltraWebTab1__ct12_txtResponseRequired').value = txtZoom.Text;

The goal of that is to just have the text from txtZoom put into the txtResponseReqruired control on the parent page.

Now I get the javascript error "Object doesn't support this property or method" Line 1 Char 4.

Help?!
FYI - I used "UltraWebTab1__ct12_txtResponseRequired" because that is how the name of the control appears when I do a "View Source"
0
Comment
Question by:PapaLorax
2 Comments
 
LVL 15

Accepted Solution

by:
stanscott2 earned 500 total points
ID: 18796057
If you've copied your Javascript directly from your code -- your syntax is wrong:

window.opener.document.getelementbyid('UltraWebTab1__ct12_txtResponseRequired').value = txtZoom.Text;

should be

window.opener.document.getElementById('UltraWebTab1__ct12_txtResponseRequired').value = txtZoom.Text;
0
 
LVL 2

Author Comment

by:PapaLorax
ID: 18796112
man - I suck. It was the capitalization.

Thank!!!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now