houssam_ballout Posted July 14, 2007 Share Posted July 14, 2007 hello all, I'd the following form: <form name='test'> <input type='text' name='test1' /> </form> and the following pic:<img src="images/index_25.gif" width="38" height="51" alt="" border="0" style="cursor:pointer" onClick="NewWindow('resultsPage.php?search=this.test.test1.value','Results Page','800','800','yes','center')"> </a>wat i Want to do is:The new window open must have the resultPage.php opened with the value of the text box?Thanks in advance Link to comment Share on other sites More sharing options...
boen_robot Posted July 14, 2007 Share Posted July 14, 2007 Considering the way the URL looks, i'd say <?phpecho $_GET['search'];?> but I think you need to somehow separate the "this.test.test1.value" from the rest of it. And I'm not sure exactly how you do that in JavaScript. Perhaps this: 'resultsPage.php?search=' . this.test.test1.value Link to comment Share on other sites More sharing options...
houssam_ballout Posted July 14, 2007 Author Share Posted July 14, 2007 Considering the way the URL looks, i'd say<?phpecho $_GET['search'];?> but I think you need to somehow separate the "this.test.test1.value" from the rest of it. And I'm not sure exactly how you do that in JavaScript. Perhaps this: 'resultsPage.php?search=' . this.test.test1.value About the php side, I can do it, but I just need the correct syntax for the javasrcipt oneThanks Link to comment Share on other sites More sharing options...
jesh Posted July 17, 2007 Share Posted July 17, 2007 It would look something like this: onclick="NewWindow('resultsPage.php?search=' + document.test.test1.value,'Results Page','800','800','yes','center');" Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.