TEENFRONT Posted April 9, 2007 Share Posted April 9, 2007 Hey everyone, I am currently half way through creating a new article manager to manage my site reviews etc. I have ben working hard and over the past 24 hours iv managed to do this ( + more but this is the important stuff ) Add-Review.php This page has a "Click here to add image" link poping up add-image.php Add-image.php This page has a php upload image script, once an image has been uploaded, you press "Close" button and the uploaded file URL, Size, and other details, are passed back to the parent window ( add-review.php ) and are displayed in input text fields. Im really wanting to ditch text fields and forms to just display the info, but i can only seem to find help with transfering values back to the parent window using forms and text fields, i just want plain text. So question... Is there a way to transfer text from a text box in the pop up window, to the parent window but in standard html..so i can use it for updating say.. a link tag, or an image tag etc. Fank Yuuuu!! Quote Link to comment Share on other sites More sharing options...
mainewoods Posted April 10, 2007 Share Posted April 10, 2007 in the parent window: URL: <span id="showurl"></span> in the opened window: <script> window.opener.document.getElementById('showurl').innerHTML = '**the url **'; </script> have not tried it but it should work, tell me if it does. Quote Link to comment Share on other sites More sharing options...
jminkler Posted April 10, 2007 Share Posted April 10, 2007 I have been using "lightbox gone wild" to create "pops". Basically then all the forms stay on the same page and can share functions and variables. Also has the benefit of looking different , fresh, and new. Pops are ugly, and dated. Quote Link to comment Share on other sites More sharing options...
TEENFRONT Posted April 10, 2007 Author Share Posted April 10, 2007 in the parent window: URL: <span id="showurl"></span> in the opened window: <script> window.opener.document.getElementById('showurl').innerHTML = '**the url **'; </script> have not tried it but it should work, tell me if it does. Hi Thats great, thanks alot for that. How would i go about updating the url of a a href tag or the src of an image tag? like... <a href="transferred link">transferred title</a> or <img src="transferred image src" /> Quote Link to comment Share on other sites More sharing options...
TEENFRONT Posted April 10, 2007 Author Share Posted April 10, 2007 Solved! Found a little javascript that does the trick. here it is if anyone else reads this! <script langauge="javascript"> function movepic(img_name,img_src) { opener.document[img_name].src=img_src; } </script> When you run this function, it replaces the img src vale of img_name and updates the image on the page accordingly. 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.