home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 July / CMCD0703.ISO / Software / Freeware / Comunicatii / slim / sbrowser.exe / biscripts / SubmitForm.js < prev   
Text File  |  2003-05-28  |  281b  |  15 lines

  1. function SubmitForm(vDoc,vFormIndex)
  2. {
  3.     var form=vDoc.forms[vFormIndex];
  4.     if (form==null) return false;
  5.     for(var i=0;i<form.elements.length;i++)    
  6.     {
  7.         var elem=form.elements[i];
  8.         if (elem.type=="submit") 
  9.         {
  10.             elem.click();
  11.             return true;
  12.         }
  13.     }
  14.     form.submit();
  15. }