![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Actually, in my case, the opener window doesn't have a form element (no <form>). |
|
For submitting data, it has buttonhandler (a javascript function) for those button (submit button). So "target" is not able to be used in the opener window's "form". |
|
But the way, thanks for your idea, now I make a copy of the opener window's input fields in the "child" window, set it in a form, then submit by using target, but it will popup another window "other", then close. Is there anyway not allowing a new window popup by target="other"? I am not allowed to use iframe. |
#12
| |||
| |||
|
|
Le 11/4/09 1:30 PM, SamuelXiao a écrit : Actually, in my case, the opener window doesn't have a form element (no <form>). So, on my idea, you can't 'click' that button by JS. (only cickable elements of forms are JS clickable) For submitting data, it has buttonhandler (a javascript function) for those button (submit button). So "target" is not able to be used in the opener window's "form". Why won't you launch directly that function declared in the mother, instead ? if(opener && * * opener.myFunction) opener.myFunction(document.getElementById('myValue ').value); But the way, thanks for your idea, now I make a copy of the opener window's input fields in the "child" window, set it in a form, then submit by using target, but it will popup another window "other", then close. *Is there anyway not allowing a new window popup by target="other"? *I am not allowed to use iframe. in the popup you need no target as you're function is supposed to close it. (just think to put a little delay before to close) if no function or no self-closing in end of it : form action="mytest.php" onsubmit="setTimeout('self.close()',100)" Answer : <input type="text" name="answer" input type="submit" /form if(opener && * * opener.myFunction) * { * *opener.myFunction(document.getElementById('myValu e').value); * *setTimeout('self.close()',500); * } -- sm |
![]() |
| Thread Tools | |
| Display Modes | |
| |