FireFox thinks opener is framset window???

E

Eetu Pikkarainen

I have a kind of a forum system (in https://wwwedu.oulu.fi/iforum/ if you
want to have a general look), where in main window is three frames.
In a certain situation there is a form (named "suorlom") one frame (say
work_frame) .
If a users selects to save the form data as ready, then users' password
must be checked and the form opens a popup window with another little form
(named "pwform") with password field (named "pw").
This popup form should write the password to the original form (to field
named "password1").

This works perfectly with IE and Opera, but with FireFox there are
problems:
When popup form is doing this:

opener.suorlom.password1.value = pwform.pw.value;

FireFox JavaScript console claims that:

Error: opener.suorlom has no properties
Source File: https://wwwedu.oulu.fi/iforum/index.ihtml
Line: 1

If you click the above URL in console, FireFox opens the source code of
the main window containing just the frameset! (although the URL is not
exactly the same as the main windows URL. ???)

Here are relevant parts of the scripts:

In "suorlom":
<SELECT NAME="ready" onChange="passw(this.selectedIndex, this.form)">

In the end of "suorlom" page:
<script type="text/javascript">
function passw (f,s) {
if (f == 1) {
win=window.open('','help','width=200,height=200, resizable,
scrollbars')
with (win) {
document.open();
document.clear();
document.writeln(' ');
document.writeln('<html><head><title>Tarkistus</title>');
document.writeln('</head><body
onload="document.pwform.pw.focus();">');
document.writeln('<form
action="javascript:eek:pener.suorlom.password1.value = pwform.pw.value;
window.close();" name="pwform" onsubmit="opener.suorlom.password1.value =
pwform.pw.value; window.close(); return false;">');
document.writeln('<b>K&auml;ytt&auml;j&auml;n tarkistus</b><br>');
document.writeln('Anna salasanasi: <input type="password" name="pw"
value="" maxlength="10" size="10"><br>');
document.writeln('<INPUT TYPE="button" VALUE=" OK "
onClick="opener.suorlom.password1.value = pwform.pw.value;
window.close();"><br>');
document.writeln('<input type="button" value="Peru"
onClick="window.close()">');
document.writeln('</form>');
document.write('</body></html>');
document.bgColor = 'silver'
document.close();
focus();
}
}
}
</script>

I tried to use "s.suorlom.password1.value" instead of
"opener.suorlom.password1.value"
but then error was "s is not defined" (Source File the same).

Am I doing something wrong, or is this FireFox bug? And how Can I work
around it?
Thank you very much!
eetu
 

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,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top