tupu
10-16-2003, 04:05 AM
I apologize for my english, I'll try to explain what is the problem corretly.
Ok, I'm opening a second window (B) from a first one (A). Then, also from A, I put code in the second window B. I write html and javascript code.
What's the problem? Javascript function isn't working. Let's see the code (simplified):
WINDOW A
--------
<html>
<...>
<script>
function fullwin() {
newWindow = window.open("",...)
newWindow.document.write(...)
newWindow.document.write(writing a script)
newWindow.document.write(writing a form)
</script>
<...>
</html>
WINDOW B
--------
Let's see the final content of window B:
<html>
<...>
<script>
function verify() {
var themessage = "";
if (document.form.log1.value=="") {themessage = "FILL THE FORM!";}
if (themessage == "") {document.form.submit();}
else {alert(themessage);return false;}}
</script>
<...>
<form action="anywhere" method=post)
<input type=text name=log1>
<input type=button value=SEND onclick="verify();"'>
</form>
<...>
</html>
I need to open a new window from A, and then write the code also from A because this is the only way a banner doesn't appear.
Well, when I get window B, and I press the button, nothing happens. I saw the code writed in the document and is correct (or I think so).
What's happening, please? Maybe the function is not loaded for the browser because I have writed from another window?
Thanx.
Ok, I'm opening a second window (B) from a first one (A). Then, also from A, I put code in the second window B. I write html and javascript code.
What's the problem? Javascript function isn't working. Let's see the code (simplified):
WINDOW A
--------
<html>
<...>
<script>
function fullwin() {
newWindow = window.open("",...)
newWindow.document.write(...)
newWindow.document.write(writing a script)
newWindow.document.write(writing a form)
</script>
<...>
</html>
WINDOW B
--------
Let's see the final content of window B:
<html>
<...>
<script>
function verify() {
var themessage = "";
if (document.form.log1.value=="") {themessage = "FILL THE FORM!";}
if (themessage == "") {document.form.submit();}
else {alert(themessage);return false;}}
</script>
<...>
<form action="anywhere" method=post)
<input type=text name=log1>
<input type=button value=SEND onclick="verify();"'>
</form>
<...>
</html>
I need to open a new window from A, and then write the code also from A because this is the only way a banner doesn't appear.
Well, when I get window B, and I press the button, nothing happens. I saw the code writed in the document and is correct (or I think so).
What's happening, please? Maybe the function is not loaded for the browser because I have writed from another window?
Thanx.