Newbie - Refering back to a window.

J

jkearney21

Hi,

i am having trouble with some syntax.

In my html when an image is clicked i have the follwoing code in a page
called BreakDownReportFilter.aspx.

onclick="javascript:OpenWindow('EquipmentSearch.aspx?pageName=BreakDownReportFilter',
'BreakDownReportFilter','resizable=yes,scrollbars=yes', 700, 200);"

In my javascript code i have the following:

function OpenWindow (URL, WinName, Features)
{
var newWind = window.open(URL, WinName, Features);
newWind.focus();
}


In the new window it opens (EquipmentSearch) when this window is
closing i what what is selected to be put into a textbox on the calling
page (BreakDownReportFilter) so i have this line of javascript.


window.opener.document.BreakDownReportFilter.txtEquipmentNumber.text =
equipNo;

I am getting an error for some reason. Can anyone spot what it is? I am
getting undefined when i try
alert(window.opener.document.BreakDownReportFilter)

Many Thanks
 
E

Evertjan.

wrote on 08 mei 2006 in comp.lang.javascript:
Hi,

i am having trouble with some syntax.

In my html when an image is clicked i have the follwoing code in a
page called BreakDownReportFilter.aspx.

onclick="javascript:OpenWindow('EquipmentSearch.aspx?pageName=BreakDown

javascript is implicit in onclick, unless you use clientside jscript on
the same page.
ReportFilter', 'BreakDownReportFilter','resizable=yes,scrollbars=yes',
700, 200);"

In my javascript code i have the following:

function OpenWindow (URL, WinName, Features)
{

where do the 700 and the 200 go?
var newWind = window.open(URL, WinName, Features);
newWind.focus();
}


In the new window it opens (EquipmentSearch) when this window is
closing i what what is selected to be put into a textbox on the
calling page (BreakDownReportFilter) so i have this line of
javascript.


window.opener.document.BreakDownReportFilter.txtEquipmentNumber.text =
equipNo;

is BreakDownReportFilter the name of an object of and in the calling
page????

what is txtEquipmentNumber the name of?
I am getting an error for some reason. Can anyone spot what it is? I
am getting undefined when i try
alert(window.opener.document.BreakDownReportFilter)

see above.

And if these are true, are they still available onunload [if that is what
you used]?
 
J

jkearney21

I figured out what was wrong. My form id was incorrect in
BreakDownReportFilter.

Many Thanks
 
E

Evertjan.

wrote on 09 mei 2006 in comp.lang.javascript:
I figured out what was wrong. My form id was incorrect in
BreakDownReportFilter.

Who and on what are you answering?

Please always quote on usenet. If you want to post a followup via
groups.google.com, don't use the "Reply" link at the bottom of the article.
Click on "show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers. <URL:
http://www.safalra.com/special/googlegroupsreply/ >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,797
Messages
2,569,647
Members
45,377
Latest member
Zebacus

Latest Threads

Top