M.a.r.k1
01-05-2003, 10:42 AM
I need help on this little prob.
i have a text input field like this at the first form
<form name=form method=post action="/cgi-bin/your-script.cgi">
quantity: <input type=text name="quantity" size=10> <a href="javascript:choosquantity('quantity', 'opener.document.form.quantity.value', 'DISC');" onMouseOver="window.status='CHOICE';return true;" onMouseOut="window.status='';return true;">CHOICE</a>
</form>
the second form is related to it to put any input and it will insert it in the first form field
function choosmawad(name, output, msg) {
newwin = window.open('','','top=150,left=150,width=325,height=300');
if (!newwin.opener) newwin.opener = self;
with (newwin.document)
{
open();
write('<html>');
write('<body onLoad="document.form.box.focus()"><form name=form>' + msg + '<br>');
write('<p>You may enter your ' + name + ' here and it will be copied into the form for you.');
write('<p><center>' + name + ': <input type=text name=box size=10 onKeyUp=' + output + '=this.value>');
write('<p><input type=button value="Click to close when finished" onClick=window.close()>');
write('</center></form></body></html>');
close();
}
what i want is to change the text input to dropdown list :
<select size=1 name=box onKeyUp=' + output + '=options.selectedIndex><option value=1 selected>1</option><option value=2 selected>2</option></select>
but it wont insert any thing , so if you could help me ... how to chang it from dealing with text input to dropdown select ?
thanks
i have a text input field like this at the first form
<form name=form method=post action="/cgi-bin/your-script.cgi">
quantity: <input type=text name="quantity" size=10> <a href="javascript:choosquantity('quantity', 'opener.document.form.quantity.value', 'DISC');" onMouseOver="window.status='CHOICE';return true;" onMouseOut="window.status='';return true;">CHOICE</a>
</form>
the second form is related to it to put any input and it will insert it in the first form field
function choosmawad(name, output, msg) {
newwin = window.open('','','top=150,left=150,width=325,height=300');
if (!newwin.opener) newwin.opener = self;
with (newwin.document)
{
open();
write('<html>');
write('<body onLoad="document.form.box.focus()"><form name=form>' + msg + '<br>');
write('<p>You may enter your ' + name + ' here and it will be copied into the form for you.');
write('<p><center>' + name + ': <input type=text name=box size=10 onKeyUp=' + output + '=this.value>');
write('<p><input type=button value="Click to close when finished" onClick=window.close()>');
write('</center></form></body></html>');
close();
}
what i want is to change the text input to dropdown list :
<select size=1 name=box onKeyUp=' + output + '=options.selectedIndex><option value=1 selected>1</option><option value=2 selected>2</option></select>
but it wont insert any thing , so if you could help me ... how to chang it from dealing with text input to dropdown select ?
thanks