thebarless
04-23-2008, 01:22 AM
I am developing a website using PHP and I need to use Javascript to open a new window as well as submit information from a pull down menu to the newly created window. The new window needs to be opened where I can control the size of it automatically, rather than have the user resize it. My problem is that the user has to make a selection from a pull-down menu and the Go button doesn't post the variable from that menu to the item.enter.php. Can I get Javascript to submit the value to the new window?
<form name="form2" method="post" action="">
<input name="name" type="hidden" id="name" value="<?=$name?>">
<select name="item" id="item">
<option selected>Choose an Item</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C"></option>>
</select>
<input type="submit" name="Submit" value="Go" onClick="window.open('item.enter.php?item=<?=$item?>&name=<?=$name?>','<?=$item?>,'width=400,height=300')">
</form>
<form name="form2" method="post" action="">
<input name="name" type="hidden" id="name" value="<?=$name?>">
<select name="item" id="item">
<option selected>Choose an Item</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C"></option>>
</select>
<input type="submit" name="Submit" value="Go" onClick="window.open('item.enter.php?item=<?=$item?>&name=<?=$name?>','<?=$item?>,'width=400,height=300')">
</form>