JLitkie Posted May 26, 2011 Share Posted May 26, 2011 Hey guys I am having a struggle with some coding. I have a page where you can open a popup window with a bunch of links on it. I want to be able to click a link and have the information obtained on the link write to a textbox on the parent window. The window needs to stay open so they can click on several links and add a bunch of information to the text box. My current coding for the child window is: while($row = mysql_fetch_array($result)) { echo"<tr><td><a href='#' class=''" ?> onclick="opener.document.forms["catering"].elements["details"].value = '<?php echo"$row[1]"; ?> '"> <?php echo"$row[1]</a> <font class='subhead'><b>$$row[4]</b></font><br></font> <font class='menutext'>$row[2]</font> </tr></td>"; } The coding for the parent window regarding the form is: <form method="POST" action="proc2.php" name="catering"> <table cellpadding=5 border=0 width=80% align=left> <tr> <td><b>Name</b></td> <td><input type=text name="name" size=50 class="form"></td> </tr> <tr> <td><b>Phone</b></td> <td><input type=text name="phone" size=25 class="form"></td> </tr> <tr> <td><b>Email</b></td> <td><input type=text name="email" size=50 class="form"></td> </tr> <tr> <td colspan=2 valign=top><b>Catering Request Description <a href="menusub.php" onclick="NewWindow(this.href,'name','500','500','yes');return false" class="menusub">(MENU)</a></b></td> </tr> <tr> <tr> <td></td> <td> <input type=hidden name="subject" value="Catering Service" size=50 class="form"> <textarea name="details" id="details" cols="50" Rows="12" style="font-size:15px; border:solid; font-family:Bradley Hand ITC, Book Antiqua, Arial; border:solid 1px; background-color:transparent;"></textarea></td> </tr> <tr> <td></td> <td><input type=submit class="submit" value="Send Message" style=""></td> </tr> </table> </form> I appreciate any help I can get!! Quote Link to comment Share on other sites More sharing options...
ginerjm Posted June 22, 2011 Share Posted June 22, 2011 If you could just provide the parts that are directly related to the problem, you might get more attention to your problem. Quote Link to comment Share on other sites More sharing options...
Adam Posted June 23, 2011 Share Posted June 23, 2011 You've not really explained what's not working. Do you receive an error? What does the HTML look like after it's been processed? I.e. what's the source of the child window? If there's a line-break or single/double-quote in $row[1] then it'll be generating a JavaScript error, in which case would explain why it's not working. 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.