Squall Leonhart
11-20-2003, 11:45 AM
Hi, guys.
Can I have two functions in one page?
Please take a look at following code.
<script language="JavaScript" type="text/javascript">
function edit(frmEdit){
if(document.frmEdit.selectEdit.options.selectedIndex<0){
alert("Items are not selected");
return false;
}
return true;
}
function delete(frmDelete){
if(document.frmDelete.selectDel.options.selectedIndex<0){
alert("Items are not selected");
return false;
}
return true;
}
</script>
And browser tells me there is error on this line
function delete(frmDelete){
Expected '[' something like that.
Can you guys notice any problem? :confused: Thanks
Can I have two functions in one page?
Please take a look at following code.
<script language="JavaScript" type="text/javascript">
function edit(frmEdit){
if(document.frmEdit.selectEdit.options.selectedIndex<0){
alert("Items are not selected");
return false;
}
return true;
}
function delete(frmDelete){
if(document.frmDelete.selectDel.options.selectedIndex<0){
alert("Items are not selected");
return false;
}
return true;
}
</script>
And browser tells me there is error on this line
function delete(frmDelete){
Expected '[' something like that.
Can you guys notice any problem? :confused: Thanks