philgreg Posted March 28, 2007 Share Posted March 28, 2007 Ok guys sorry about this... I have built a form in this form there are several field one allows the editors to upload images for a blog post I have a button that allows you to open a child window . the child window does the uploading....here's the code...it all works nicely it writes the variable in the form page it gets sent to , "in this case addPost.php" however addpost.php is opening up in the child window. I just want the child window to close and as it does the variable to show up in the parent window. Heres the child window code, can you help me ? <body onunload="window.opener.location.reload()"> <form action="addPost.php" method="post" enctype="multipart/form-data" name="form" id="form"> <input name="var" type="hidden" value="value="<?=$name?>" /> <table width="51%" border="1" bgcolor="#CCCCFF"> <tr> <td width="34%">choose image </td> <td width="66%"><input type="file" name="imgfile" /></td> </tr> <tr> <td><label></label></td> <td><input type="submit" name='submit' value="add post" /> </td> </tr> </table> <p></p> </form> ?> Quote Link to comment Share on other sites More sharing options...
Lytheum Posted March 29, 2007 Share Posted March 29, 2007 Plenty of tutorials about this on Google. Although it seems it is more of a Javascript thing. http://www.moock.org/webdesign/javascript/popupwindows/loadurlinparent.html Quote Link to comment Share on other sites More sharing options...
philgreg Posted March 30, 2007 Author Share Posted March 30, 2007 Well I'll try it but I asked here as I though you guys would give me a more detailed answer. Naturally I had tried google but it didnt provide me with the answer I was looking for. thanks for your response. Quote Link to comment Share on other sites More sharing options...
philgreg Posted March 30, 2007 Author Share Posted March 30, 2007 nah, whilst it worked it now doesnt pass the variable back to my main form Quote Link to comment Share on other sites More sharing options...
philgreg Posted April 3, 2007 Author Share Posted April 3, 2007 Can anyone please help me with this....? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.