html - SCRIPT438: Object doesn't support this property or method: 'Document.GetElementsByName' -


i have below code , after debugging i've hit brick wall. whilst debugging throws error

script438: object doesn't support property or method: 'document.getelementsbyname'

when executing submit button loads spreadsheet because of error doesn't know write able follow through actions.

code below

<! doctype html> <html> <head> <meta http-equiv="x-ua-compatible" content="ie=9"> <script language="vbscript" type="text/vbscript"> sub divert ()     dim irow     set objexcel = createobject ("excel.application")     set objworkbook = objexcel.workbooks.open ("g:\bournemouth\corporateshared\general insurance\gi complaint team\cru diverted\diverted.xlsx")     objexcel.application.visible = true     objworkbook.windows (1).visible = true     set xlsheet =objworkbook.sheets (1)     xlsheet.activate      irow = 1     objexcel     while .cells (irow, 1).value <> ""     .cells (irow, 1).activate     irow = irow + 1     loop      .cells (irow, 1).value=document.getelementsbyname ("date2") (0).value     .cells (irow, 2).value=document.getelementsbyname ("date3") (0).value     .cells (irow, 3).value=document.getelementsbyname ("name1") (0).value     .cells (irow, 4).value=document.getelementsbyname ("acti") (0).value     .cells (irow, 5).value=document.getelementsbyname ("supwho") (0).value     .cells (irow, 6).value=document.getelementsbyname ("prowhi") (0).value     .cells (irow, 7).value=document.getelementsbyname ("trawha") (0).value     .cells (irow, 8).value=document.getelementsbyname ("hanwho") (0).value     .cells (irow, 9).value=document.getelementsbyname ("prowha") (0).value     .cells (irow, 10).value=document.getelementsbyname ("surwho") (0).value     .cells (irow, 11).value=document.getelementsbyname ("letwho") (0).value     .cells (irow, 12).value=document.getelementsbyname ("miwha") (0).value     .cells (irow, 13).value=document.getelementsbyname ("miwho") (0).value     .cells (irow, 14).value=document.getelementsbyname ("time1") (0).value     .cells (irow, 15).value=document.getelementsbyname ("desc1") (0).value        end     objworkbook. save     objworkbook. close     set objworkbook = nothing     set objexcel = nothing  end sub </script>  <style type="text/css"> form    {      margin: auto;     position: relative;     width: 550px;     height: 450px;     font-family: tahoma, geneva, sans-serif;     font-size: 14px;     font-style: italic;     line-height: 24px;     font-weight: bold;     color: green;     text-decoration: none;     border-radius: 10px;     padding: 10px;     border: 1px solid #999;     border: inset 1px solid #333;     } button  {     width: 100px;     position: absolute;     right: 20px;     bottom: 20px;     background: #09c;     color: #fff;     font-family: tahoma, geneva, sans-serif;     height: 30px;     border-radius: 15px;     border: 1p solid #999;     }  input.button:hover {     background: #fff;     color: #09c;     } textarea:focus, input:focus {     border: 1px solid #09c;     }  </style>   <script type="text/javascript"> function showfield(name){     hidefield();     document.getelementbyid( 'div-' + name).style.display="block"; }   function hidefield() { document.getelementbyid('div-1').style.display='none'; document.getelementbyid('div-2').style.display='none'; document.getelementbyid('div-3').style.display='none'; document.getelementbyid('div-4').style.display='none'; document.getelementbyid('div-5').style.display='none'; document.getelementbyid('div-6').style.display='none'; document.getelementbyid('div-7').style.display='none'; document.getelementbyid('div-8').style.display='none'; } </script>    </head> <body onload="hidefield()"> <form> <fieldset> <legend>diverted time sheet</legend> <center> date:<br> <input id="date" name="date2" maxlength="10" size="10"> <script type="text/javascript">     var today = new date();     var dd = today.getdate();     var mm = today.getmonth()+1; //january 0!     var yyyy = today.getfullyear();     if(dd<10) {         dd='0'+dd     }      if(mm<10) {         mm='0'+mm     }      today = dd+'/'+mm+'/'+yyyy;     document.getelementbyid('date').value = today;     </script>    <br> <input type="hidden" id="date1" name="date3"> <script type="text/javascript">     var today = new date();     var dd = today.getdate();     var mm = today.getmonth()+1;     var yyyy = today.getfullyear();     if(dd<10) {         dd='0'+dd     }      if(mm<10) {         mm='0'+mm     }      today = dd+'/'+mm+'/'+yyyy;     document.getelementbyid('date1').value = today;     </script> name :<br> <select name="name1" value="">     <option value="james dark">james dark</option>     <option value="jane dean">jane dean</option>     <option value="leanne lambert">leanne lambert</option>     <option value="tracey stratford">tracey stratford</option>     <option value="robert macallan">robert macallan</option>     <option value="michael mcdonald">michael mcdonald</option>     <option value="sarah murphy">sarah murphy</option>     <option value="amanda myatt">amanda myatt</option>     <option value="joanne kerley">joanne kerley</option>     <option value="kay land">kay land</option>     <option value="john dinsdale">john dinsdale</option>     <option value="chris baxter">chris baxter</option>     <option value="casey sparkes">casey sparkes</option>     <option value="james purnell">james purnell</option>     <option value="kate bingham">kate bingham</option>     <option value="kevin dix">kevin dix</option>     <option value="tyrone moll">tyrone moll</option>     <option value="kate bishop">kate bishop</option>     <option value="jason gamble">jason gamble</option>     <option value="tony parkinson">tony parkinson</option>     <option value="tom seaman">tom seaman</option>     <option value="carolyn lester">carolyn lester</option>     <option value="debbie gray">debbie gray</option>     <option value="chris mccormack">chris mccormack</option>     <option value="marion greenaway">marion greenaway</option>     <option value="sarah white">sarah white</option>     <option value="angela manning">angela manning</option>     <option value="buffy gammond">buffy gammond</option>     <option value="andy holmes">andy holmes</option>     <option value="nathan gatehouse">nathan gatehouse</option>     <option value="dan bishop">dan bishop</option>     <option value="heather townend">heather townend</option>     <option value="ben krigers">ben krigers</option>     <option value="jacob gibney">jacob gibney</option>     <option value="robert mcleish">robert mcleish</option>     <option value="stuart vidler">stuart vidler</option>     <option value="rebekah coldwell">rebekah coldwell</option>     <option value="majid ali">majid ali</option>     <option value="sharon borg">sharon borg</option>     <option value="rich hall">rich hall</option>     <option value="paul dargan">paul dargan</option>     <option value="mel davis">mel davis</option>     <option value="elaine hawkins">elaine hawkins</option>     <option value="humma khan">humma khan</option>     <option value="chris jones">chris jones</option>     <option value="matt tottle">matt tottle</option>     <option value="nathan middleton">nathan middleton</option>     <option value="helen wentland">helen wentland</option>     <option value="adriann quintas">adriann quintas</option> </select><br> activity :<br> <select name="acti" value="" onchange="showfield(this.options[this.selectedindex].value)">     <option value="9">worked hours</option>     <option value="10">overtime</option>     <option value="11">sickness</option>     <option value="12">unpaid leave</option>     <option value="13">compassionate leave</option>     <option value="14">holiday inc bank holidays</option>     <option value="15">team meetings</option>     <option value="16">one ones</option>     <option value="17">one 1 prep</option>     <option value="18">huddles</option>     <option value="1">supplier meetings</option>     <option value="2">product meetings</option>     <option value="3">training/coaching</option>     <option value="4">handling other peoples cases</option>     <option value="5">project work</option>     <option value="6">surgery time gk</option>     <option value="7">letter checks , feedback</option>     <option value="8">mi/reporting/rca</option> </select><br> <div id="div-1">supplier meetings :<br> <select name="supwho" value="">     <option value=""></option>     <option value="davies">davies</option>     <option value="gelder">gelder</option>     <option value="evander">evander</option>     <option value="brittania rescue">brittania rescue</option> </select><br></div> <div id="div-2">which product meeting :<br> <select name="prowhi" value="">     <option value=""></option>     <option value="home">home</option>     <option value="motor">motor</option>     <option value="legal">legal</option>     <option value="travel">travel</option> </select><br></div> <div id="div-3">what training/coaching :<br> <select name="trawha" value="">     <option value=""></option>     <option value="leon">leon</option>     <option value="releases">releases</option>     <option value="complaint">complaint</option>     <option value="team leader">team leader</option>     <option value="updates">updates</option>     <option value="other">other</option> </select><br></div> <div id="div-4">whos case handling :<br> <select name="hanwho" value="">     <option value=""></option>     <option value="james dark">james dark</option>     <option value="jane dean">jane dean</option>     <option value="leanne lambert">leanne lambert</option>     <option value="tracey stratford">tracey stratford</option>     <option value="robert macallan">robert macallan</option>     <option value="michael mcdonald">michael mcdonald</option>     <option value="sarah murphy">sarah murphy</option>     <option value="amanda myatt">amanda myatt</option>     <option value="joanne kerley">joanne kerley</option>     <option value="kay land">kay land</option>     <option value="john dinsdale">john dinsdale</option>     <option value="chris baxter">chris baxter</option>     <option value="casey sparkes">casey sparkes</option>     <option value="james purnell">james purnell</option>     <option value="kate bingham">kate bingham</option>     <option value="kevin dix">kevin dix</option>     <option value="tyrone moll">tyrone moll</option>     <option value="kate bishop">kate bishop</option>     <option value="jason gamble">jason gamble</option>     <option value="tony parkinson">tony parkinson</option>     <option value="tom seaman">tom seaman</option>     <option value="carolyn lester">carolyn lester</option>     <option value="debbie gray">debbie gray</option>     <option value="chris mccormack">chris mccormack</option>     <option value="marion greenaway">marion greenaway</option>     <option value="sarah white">sarah white</option>     <option value="angela manning">angela manning</option>     <option value="buffy gammond">buffy gammond</option>     <option value="andy holmes">andy holmes</option>     <option value="nathan gatehouse">nathan gatehouse</option>     <option value="dan bishop">dan bishop</option>     <option value="heather townend">heather townend</option>     <option value="ben krigers">ben krigers</option>     <option value="jacob gibney">jacob gibney</option>     <option value="robert mcleish">robert mcleish</option>     <option value="stuart vidler">stuart vidler</option>     <option value="rebekah coldwell">rebekah coldwell</option>     <option value="majid ali">majid ali</option>     <option value="sharon borg">sharon borg</option>     <option value="rich hall">rich hall</option>     <option value="paul dargan">paul dargan</option>     <option value="mel davis">mel davis</option>     <option value="elaine hawkins">elaine hawkins</option>     <option value="humma khan">humma khan</option>     <option value="chris jones">chris jones</option>     <option value="matt tottle">matt tottle</option>     <option value="nathan middleton">nathan middleton</option>     <option value="helen wentland">helen wentland</option>     <option value="adriann quintas">adriann quintas</option>     <option value="business area">business area</option> </select><br></div> <div id="div-5">what project work :<br> <select name="prowha" value="">     <option value=""></option>     <option value="fca changes">fca changes</option>     <option value="audit">audit</option>     <option value="rca">rca</option> </select><br></div> <div id="div-6">surgery time :<br> <select name="surwho" value="">     <option value=""></option>     <option value="james dark">james dark</option>     <option value="jane dean">jane dean</option>     <option value="leanne lambert">leanne lambert</option>     <option value="tracey stratford">tracey stratford</option>     <option value="robert macallan">robert macallan</option>     <option value="michael mcdonald">michael mcdonald</option>     <option value="sarah murphy">sarah murphy</option>     <option value="amanda myatt">amanda myatt</option>     <option value="joanne kerley">joanne kerley</option>     <option value="kay land">kay land</option>     <option value="john dinsdale">john dinsdale</option>     <option value="chris baxter">chris baxter</option>     <option value="casey sparkes">casey sparkes</option>     <option value="james purnell">james purnell</option>     <option value="kate bingham">kate bingham</option>     <option value="kevin dix">kevin dix</option>     <option value="tyrone moll">tyrone moll</option>     <option value="kate bishop">kate bishop</option>     <option value="jason gamble">jason gamble</option>     <option value="tony parkinson">tony parkinson</option>     <option value="tom seaman">tom seaman</option>     <option value="carolyn lester">carolyn lester</option>     <option value="debbie gray">debbie gray</option>     <option value="chris mccormack">chris mccormack</option>     <option value="marion greenaway">marion greenaway</option>     <option value="sarah white">sarah white</option>     <option value="angela manning">angela manning</option>     <option value="buffy gammond">buffy gammond</option>     <option value="andy holmes">andy holmes</option>     <option value="nathan gatehouse">nathan gatehouse</option>     <option value="dan bishop">dan bishop</option>     <option value="heather townend">heather townend</option>     <option value="ben krigers">ben krigers</option>     <option value="jacob gibney">jacob gibney</option>     <option value="robert mcleish">robert mcleish</option>     <option value="stuart vidler">stuart vidler</option>     <option value="rebekah coldwell">rebekah coldwell</option>     <option value="majid ali">majid ali</option>     <option value="sharon borg">sharon borg</option>     <option value="rich hall">rich hall</option>     <option value="paul dargan">paul dargan</option>     <option value="mel davis">mel davis</option>     <option value="elaine hawkins">elaine hawkins</option>     <option value="humma khan">humma khan</option>     <option value="chris jones">chris jones</option>     <option value="matt tottle">matt tottle</option>     <option value="nathan middleton">nathan middleton</option>     <option value="helen wentland">helen wentland</option>     <option value="adriann quintas">adriann quintas</option>     <option value="business area">business area</option> </select><br></div> <div id="div-7">letter check :<br> <select name="letwho" value="">     <option value=""></option>     <option value="james dark">james dark</option>     <option value="jane dean">jane dean</option>     <option value="leanne lambert">leanne lambert</option>     <option value="tracey stratford">tracey stratford</option>     <option value="robert macallan">robert macallan</option>     <option value="michael mcdonald">michael mcdonald</option>     <option value="sarah murphy">sarah murphy</option>     <option value="amanda myatt">amanda myatt</option>     <option value="joanne kerley">joanne kerley</option>     <option value="kay land">kay land</option>     <option value="john dinsdale">john dinsdale</option>     <option value="chris baxter">chris baxter</option>     <option value="casey sparkes">casey sparkes</option>     <option value="james purnell">james purnell</option>     <option value="kate bingham">kate bingham</option>     <option value="kevin dix">kevin dix</option>     <option value="tyrone moll">tyrone moll</option>     <option value="kate bishop">kate bishop</option>     <option value="jason gamble">jason gamble</option>     <option value="tony parkinson">tony parkinson</option>     <option value="tom seaman">tom seaman</option>     <option value="carolyn lester">carolyn lester</option>     <option value="debbie gray">debbie gray</option>     <option value="chris mccormack">chris mccormack</option>     <option value="marion greenaway">marion greenaway</option>     <option value="sarah white">sarah white</option>     <option value="angela manning">angela manning</option>     <option value="buffy gammond">buffy gammond</option>     <option value="andy holmes">andy holmes</option>     <option value="nathan gatehouse">nathan gatehouse</option>     <option value="dan bishop">dan bishop</option>     <option value="heather townend">heather townend</option>     <option value="ben krigers">ben krigers</option>     <option value="jacob gibney">jacob gibney</option>     <option value="robert mcleish">robert mcleish</option>     <option value="stuart vidler">stuart vidler</option>     <option value="rebekah coldwell">rebekah coldwell</option>     <option value="majid ali">majid ali</option>     <option value="sharon borg">sharon borg</option>     <option value="rich hall">rich hall</option>     <option value="paul dargan">paul dargan</option>     <option value="mel davis">mel davis</option>     <option value="elaine hawkins">elaine hawkins</option>     <option value="humma khan">humma khan</option>     <option value="chris jones">chris jones</option>     <option value="matt tottle">matt tottle</option>     <option value="nathan middleton">nathan middleton</option>     <option value="helen wentland">helen wentland</option>     <option value="adriann quintas">adriann quintas</option>     <option value="business area">business area</option> </select><br></div> <div id="div-8">what mi/reporting/rca :<br> <select name="miwha" value="">     <option value=""></option>     <option value="nationwide">nationwide</option>     <option value="daily review">daily review</option>     <option value="adhoc">adhoc</option> </select><br> requested mi/reporting/rca :<br> <select name="miwho" value="">     <option value=""></option>     <option value="chris joy">chris joy</option>     <option value="nadine ralph">nadine ralph</option>     <option value="darrel minvalla">darrel minvalla</option>     <option value="amanda may">amanda may</option>     <option value="treca legg">treca legg</option>     <option value="business area">business area</option> </select><br></div> <div id="div-9"></div><div id="div-10"></div><div id="div-11"></div><div id="div-12"></div><div id="div-13"></div><div id="div-14"></div><div id="div-15"></div><div id="div-16"></div><div id="div-17"></div><div id="div-18"></div> time in minutes :<br> <input type="text" name="time1" value=""> <br> description :<br> <input type="text" name="desc1" value=""><br> <br> <input type="button" onclick="divert()" value="submit"><br> </center> </fieldset> </form> </body> </html> 

i've been working on time , stumped, appreciated.

its write actions colleagues during day spreadsheet can reviewed, on internal network.

thanks


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -