Solved

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

Posted on 2007-03-26
2
295 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…

840 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