Solved

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…

746 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

14 Experts available now in Live!

Get 1:1 Help Now