PDA

View Full Version : object expected error


ebco
08-27-2003, 02:03 PM
the below mentined code giving me object expected error if i puts it at the bottom of the page?
I can't declar variable on runtime or what it is?


<script language="javascript">
var rmovies_store = "";
var rmoviesid_store = "";
for (m=0; m<document.frm.list1.length; i++)
{
if(document.frm.list1.length-1 > m){
rmovies_store = rmovies_store + document.frm.list1.options[m].text + ","
rmoviesid_store = rmoviesid_store + document.frm.list1.options[m].value + ","
}
else{
rmovies_store = rmovies_store + document.frm.list1.options[m].text + ","
rmoviesid_store = rmoviesid_store + document.frm.list1.options[m].value + ","
}
}
alert(rmovies_store);
alert(rmoviesid_store);
</script>

ebco
08-27-2003, 02:08 PM
It was my fulishness

for (m=0; m<document.frm.list1.length; i++)



:)