javascript - send data from a new window to previous window in php -
javascript - send data from a new window to previous window in php -
i have image in main.php
file :
<img src="..\images\image.gif" class="cur" onclick="imgwin();">
when click on image below function has called :
function imgwin() { imagewin=window.open("../pages/img.php","imagewin","toolbar=no,width=500,height=200,directories=no,menubar=no,scrollbars=yes"); }
this function opens img.php in new window
img.php file :
<html> <head> <title>upload image</title> </head> <body> <form name="imgform" method="get" action="#"> address : <input type="file" name="imgurl" size="50"> description : <input type="text" name="description" size="50"> <input type="submit" value="sumbit"> </form> </body> </html>
i want when click on submit
button in above form , info imgurl
, description
textboxes send main.php
file.
how can ?
you should naming windows.....
<form action="foobar.php" method="get" target="foo"> first name: <input type="text" name="fname" /><br /> lastly name: <input type="text" name="lname" /><br /> <input type="submit" value="submit" /> </form>
this submit form target window named "foo" , action foobar.php ... when open window, javascript, specify "name" target ..
window.open(url,name,specs,replace)
php javascript post new-window
Comments
Post a Comment