PHP : how to trigger javascript function from a button in another page -
i have 3 buttons.
- search button : open popup page.
- add row button : trigger javascript function add row.
- select button : trigger javascript function row value , send main page.
search , add row buttons in main page, , select button on popup page.
i need select button handle javascript function in main page, can remove add row button.
to put simple, question how trigger javascript function add row in main page, using select button in popup page?
if question isn't clear please ask, thanks.
i take general example.
(parent window)
<html> <script language="javascript"> function openwindow() { window.open("target.html","_blank","height=200,width=400, status=yes,toolbar=no,menubar=no,location=no"); } </script> <body> <form name=frm> <input id=text1 type=text> <input type=button onclick="javascript:openwindow()" value="open window.."> </form> </body> </html>
(child window)
<html> <script language="javascript"> function changeparent() { window.opener.document.getelementbyid('text1').value="value changed.."; window.close(); } </script> <body> <form> <input type=button onclick="javascript:changeparent()" value="change opener's textbox's value.."> </form> </body> </html>
more discussion: javascript - pass selected value popup window parent window input box
Comments
Post a Comment