Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Listbox submit problems


Message #1 by "Shaukat Desai" <shaukatdesai@h...> on Wed, 20 Feb 2002 17:57:34
Hi,

I changed the form tag with and without the return bit.  

<form name="frmReport"
 method="get" onSubmit=" selectList()">  

I also changed the javascript with and without the return statement.  

 if(_objSelEntityB.name !=undefined){
 			doselectforsubmit(_objSelEntityB)
 			alert("selEntity " +_objSelEntityB.name)
 }
  
The problem I have is if I select all the items using the all option (>>), 
the form just doesn't submit. But if I select about 45 items using the 
single item option (>) it submits the form, any more and it fails to 
submit.

Thanks

Shaukat

> The onSubmit in <Form> <form name="frmReport"
> method="get" onSubmit="return selectList()">  should
> have selectList(); onSubmit="selectList()"
> 
> 
> The selectList() function should not have   
> document.frmReport.submit()
> 
> 
> If you want to prevent the form from bieng submitted
> 
> 	
> 
> Use the onSubmit event handler to prevent a form from
> being submitted; to do so, put a return statement that
> returns false in the event handler. Any other returned
> value lets the form submit. If you omit the return
> statement, the form is submitted.
> 

  Return to Index