473,394 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Communicating Back to Main Window

hi, i can't get a child window communicate Back to the Main Window
This is my code:

var win1 = window.opener;
function f_close()
{
win1.corredor_frame.sp_text_corredor.innerText = "change this value";
window.close();
}

corredor_frame is the frame where the child window was opened, my problem is
this doesn't work with Mozilla , i got "win1.corredor_frame has no
properties" error, instead it works fine with IE.

I'm very newbie with Javascript, it seems like i'm using some "only" IE
code, but i can't find the standar way.

Any help would be appreciated
Jul 20 '05 #1
1 1543
DU
chauz wrote:
hi, i can't get a child window communicate Back to the Main Window
This is my code:

var win1 = window.opener;
function f_close()
{
win1.corredor_frame.sp_text_corredor.innerText = "change this value";
window.close();
}

corredor_frame is the frame where the child window was opened, my problem is
this doesn't work with Mozilla , i got "win1.corredor_frame has no
properties" error, instead it works fine with IE.

sp_text_corredor is what? A paragraph? An input?

Try

function f_close()
{
opener.corredor_frame.sp_text_corredor.childNodes[0].nodeValue =
"change this value";
window.close();
}

I'm pretty sure I could figure out your problem if only I could see the
whole code.

DU
I'm very newbie with Javascript, it seems like i'm using some "only" IE
code,
innerText is IE only. childNodes[index].nodeValue is DOM and is well
supported by W3C DOM 2 compliant browsers (and that includes MSIE 6 for
Windows). Any DOM 2 CharacterData compliant browser will also support
childNodes[index].data or childNodes[index].nodeValue as long as the
targeted node is of type TEXT_NODE.

Be careful with Mozilla-based browsers as white spaces count as TEXT_NODE.

but i can't find the standar way.
Any help would be appreciated


Can you provide an url?

DU

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eric Brunel | last post by:
Hi all, We're trying to communicate with Microsoft Visual C++ 6.0 via COM to make it perform a few operations. Our main need is to set a breakpoint on a given line in a given file. We ended up...
3
by: Stan | last post by:
Hallo, I have developed an application in MS Access 2000 (Polish version) under MS Windows XP prof (also Polish). Now I would like to run this code on MS Windows XP EN and MS Access XP EN. I have...
2
by: Matthew Playne | last post by:
Hi, I am having a problem communicating between to classes. I have an MDI application. The parent window contains a mainMenu and a toolbar and toolbuttons, and the child form contains a...
3
by: Alan | last post by:
I have a form that contains many fields for the user to enter. After entering the data the user can click a link to open a new window, the new window contains six columns (pull down menu) and 30...
2
by: Veleek | last post by:
An alternate title for this might be "Creating my own set of core classes". Just a quick overview. In order to learn C#, Sockets, Multithreading and whatever else I can, I am attempting to...
7
by: maralfarshadi | last post by:
Dear All I am working on a Java based Web app - In this application, a window contains many textboxes which open the same child window. The user should choose among the option boxes provided and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.