|
Hi guys. I'm having a bit of confusion on how I can take a value from one (popped up) window and insert it into a form in another window (the winow where the popup came from).
Here is my code at the moment:
<script type="text/javascript">
<!--
function sendText(e, text)
{
e.value = text
}
</script>
$query = safe_query("SELECT * FROM `table` ORDER BY `manager_name` ASC ");
while($p=mysql_fetch_array($query)) {
$user = $p['manager_name'];
$id = $p['id'];
echo "<p><a href='' title='' onclick='sendText(document.sendmoney_form.to, '$user')'>$user</a></p>";
}
The form is called "sendmoney_form" and the field I want it in is called "to". I'm also trying to make it so that the window will close once a value has been entered into the form field.
Thanks.
|