Click to See Complete Forum and Search --> : what worng with it?


scialom
07-15-2003, 05:13 AM
Hi,

I have a form - my_form
with list box - my_listbox

I try to put the data into var like this:
my_listbox=document.my_form.my_listbox

and I get an error message that is a null or not an object.

Why?

Thanks,
Assaf

Gollum
07-15-2003, 05:43 AM
Can't see anything wrong here. Can you show us a little code?

scialom
07-15-2003, 05:50 AM
here, it is with php:
<form action="additem.php" method="post" name="my_form">
<select name=my_listbox>
<? $Sql = "select * from tbl_item order by item_name";
$result = mysql_query($Sql);
while ($row = mysql_fetch_array($result)){?>
<option value="<?=$row['item_id']?>"><?=$row['item_name']?>
<?
}
?>
</select>


Thanks,
Assaf

Gollum
07-15-2003, 07:02 AM
That looks fine. Have you got a URL that shows your error?
Sorry I'm not being much help here

scialom
07-15-2003, 07:09 AM
Sorry, It is in my company intranet...

Assaf