locked
javascript runtime error on web form application RRS feed

  • Question

  • User-127506019 posted

    There is a runtime error when accessing javascript.

    This problem was due to me being told to clean up the disk space since on my 'C' drive since I was running out of space. However I find out that I removed too much and reininstalled visual studio 2010 ultimate on my workstation.

    Now the vb.net 2010 webform t runs for awhile, until it gets the following a runtime error on this following line of code:  onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MPContent$btnLogin", "", true, "", "", false, false))" id="ctl00_MPContent_btnLogin" class="ui-widget-content ui-corner-all" ItemStyle-CssClass="ui-widget-content" />'.

    In case this helps, here are the references at the top of the default.aspx page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml"> <head><link rel="stylesheet" type="text/css" href="../styles/site.css" /><link rel="stylesheet" type="text/css" href="../styles/jquery-ui-1.7.2.custom.css" /><title>  Login - Attendance Letters </title>     <script src="../scripts/jquery-1.3.2.js" type="text/javascript"></script>     <script src="../scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>        <script src="../scripts/site.js" type="text/javascript"></script>     <script src="../scripts/json2.js" type="text/javascript"></script> 

    Also here are references next the code where the runtime error occurs: </head> <body>     <form name="aspnetForm" method="post" action="/AttendanceLetters/login/default.aspx" id="aspnetForm"> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTE4MzY1Nzk3Mw9kFgJmD2QWAgIDD2QWCAIFDw8WAh4EVGV4dAUcQXR0ZW5kYW5jZSBMZXR0ZXJzIEFuZCBGb3Jtc2RkAg0PDxYCHwAFFVlvdSBhcmUgbm90IGxvZ2dlZCBpbmRkAhMPPCsADQEADxYCHgtfIURhdGFCb3VuZGdkZAIZD2QWAgIBDw8WAh4HVmlzaWJsZWdkFgQCBQ8PZBYCHgpvbktleVByZXNzBSlkb0NsaWNrKCdjdGwwMF9NUENvbnRlbnRfYnRuTG9naW4nLGV2ZW50KWQCCw8PZBYCHwMFKWRvQ2xpY2soJ2N0bDAwX01QQ29udGVudF9idG5Mb2dpbicsZXZlbnQpZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUXY3RsMDAkaW1nYnRuTG9naW5Mb2dvdXQP75AxEYwPGjKaBWHexpgg0iYIqA==" /> <script src="/AttendanceLetters/ScriptResource.axd?d=QDqolbkZamH6_yj4rzCfhROCKxH0XPcplq7uXJixhqEzEviU4d0bWaEsqBfoMNQ7O4jUuLQ4W_BcSkvQQk70tpLgJj-1SNQOttERAjnV03o1&amp;t=16ab2387" type="text/javascript"></script> <script type="text/javascript">

    I want to mention that the application runs on another computer where the user of the computer is not a programmer. Thus I am wondering if you can tell me what you think I should look and/or could be causing the problem? Do I need to install javascript object and/or something else on my computer?

    Friday, September 22, 2017 4:46 PM

Answers

  • User-1838255255 posted

    Hi peggy_girl,

    Through your description, I hope you could post your code and error message, which line code caused this issue? If you tested it in the other computer? Work or not? Also you could check the error message in Browser-F12-Console panel?

    Best Regards,

    Eric Du

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 25, 2017 6:44 AM

All replies

  • User-1838255255 posted

    Hi peggy_girl,

    Through your description, I hope you could post your code and error message, which line code caused this issue? If you tested it in the other computer? Work or not? Also you could check the error message in Browser-F12-Console panel?

    Best Regards,

    Eric Du

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 25, 2017 6:44 AM
  • User-127506019 posted

    The following is in response to your response and a dew more items:

    1. The application does work on the other computer with no problem,

    2. The following is the error message that I am getting:

    onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MPContent$btnLogin&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MPContent_btnLogin" class="ui-widget-content ui-corner-all" ItemStyle-CssClass="ui-widget-content" />'.

    Using internet explorer debugger, I am getting the following error:

    Line: 52 Error: Object doesn't support property or method 'from'

    var firstVisibleElement = Array.from(document.querySelector("#rso").children) .find(positiveClientHeight)

    This error occurs once you hit the button on the logon page.

    3. Here is more code surrounding the error message

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><link rel="stylesheet" type="text/css" href="../styles/site.css" /><link rel="stylesheet" type="text/css" href="../styles/jquery-ui-1.7.2.custom.css" /><title>
    	Login - Attendance Letters
    </title>
    
        <script src="../scripts/jquery-1.3.2.js" type="text/javascript"></script>
        <script src="../scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>   
         
        
        <script src="../scripts/site.js" type="text/javascript"></script>
        <script src="../scripts/json2.js" type="text/javascript"></script>	
    
        <script type="text/javascript">
            function doClick(buttonName, e) {
                //the purpose of this function is to allow the enter key to 
                //point to the login button to click.
                var key;
    
                if (window.event)
                    key = window.event.keyCode;     //IE
                else
                    key = e.which;     //firefox
    
                if (key == 13) {
                    //Get the login button so to execute the click event
                    var btn = document.getElementById(buttonName);
                    if (btn != null) { //If we find the button click it
                        btn.click();
                        event.keyCode = 0
                    }
                }
            }
    </script>
    
    </head>
    <body>
        <for name="aspnetForm" method="post" action="/AttendanceLetters/login/default.aspx" id="aspnetForm">
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTE4MzY1Nzk3Mw9kFgJmD2QWAgIDD2QWCAIFDw8WAh4EVGV4dAUcQXR0ZW5kYW5jZSBMZXR0ZXJzIEFuZCBGb3Jtc2RkAg0PDxYCHwAFFVlvdSBhcmUgbm90IGxvZ2dlZCBpbmRkAhMPPCsADQEADxYCHgtfIURhdGFCb3VuZGdkZAIZD2QWAgIBDw8WAh4HVmlzaWJsZWdkFgQCBQ8PZBYCHgpvbktleVByZXNzBSlkb0NsaWNrKCdjdGwwMF9NUENvbnRlbnRfYnRuTG9naW4nLGV2ZW50KWQCCw8PZBYCHwMFKWRvQ2xpY2soJ2N0bDAwX01QQ29udGVudF9idG5Mb2dpbicsZXZlbnQpZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUXY3RsMDAkaW1nYnRuTG9naW5Mb2dvdXQP75AxEYwPGjKaBWHexpgg0iYIqA==" />
    
    <script src="/AttendanceLetters/ScriptResource.axd?d=QDqolbkZamH6_yj4rzCfhROCKxH0XPcplq7uXJixhqEzEviU4d0bWaEsqBfoMNQ7O4jUuLQ4W_BcSkvQQk70tpLgJj-1SNQOttERAjnV03o1&amp;t=16ab2387" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
    //]]>
    </script>
    
    <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBgL1haHtBAL6v9GXCQL+pISgCwKE1cL9BALW79u5AwLjvp+dA5MO0j5jvQI66p6qHXIiWV+FeqZ/" />
        
    <div id="container">
    
        <div id="header">
            
            <a id="ctl00_lnkHome" href="../"><img id="ctl00_imgLogo" src="../images/aPlusBlrdClear.gif" align="left" border="0" /></a> 
                
            <div id="headertitle">
                    
                <h1><span id="ctl00_lblHeaderTitle">Attendance Letters And Forms</span></h1>
                <span id="ctl00_SiteMapPath1"><a href="#ctl00_SiteMapPath1_SkipLink"><img alt="Skip Navigation Links" height="0" width="0" src="/AttendanceLetters/WebResource.axd?d=uiCAS6M7eByMxgoB1qU-RQ2&amp;t=636415947505657653" border="0" /></a><a id="ctl00_SiteMapPath1_SkipLink"></a></span>
            </div>   
            
            <div id="loginout">
                <input type="image" name="ctl00$imgbtnLoginLogout" id="ctl00_imgbtnLoginLogout" src="../images/ico-login.gif" align="absbottom" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$imgbtnLoginLogout&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" border="0" />
                <a id="ctl00_hypLoginLogout" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$hypLoginLogout&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))">Login</a>
                <br />
                <span id="ctl00_lblLoginMessage" class="user_settings">You are not logged in</span>
                <br />
                <span id="ctl00_lblLoginName" class="user_settings"></span>
                <br />
               <span id="ctl00_lblDatabase" class="user_settings"></span>
            </div>        
            <br class="clear" />        
            <hr />
            <div id="menu" class="menu" >  
                
            </div>        
            <br  class="clear" />        
        </div>
           <div id="content">
                  <br />  
            
        <div id="ctl00_MPContent_pnlLogin">
    	
            <div id="opsform-login" class="ui-widget-content ui-corner-all" style="width: 400px; margin-left: auto; margin-right: auto; padding: 20px; border: 1px solid #003366;" >
                <span id="ctl00_MPContent_lblLoginHeader">Please enter your OPS username and password below:</span>
                <br />
                <br />
                <span id="ctl00_MPContent_lblUserName" ItemStyle-CssClass="ui-widget-content">Username:</span>
                <input name="ctl00$MPContent$txtUsername" type="text" id="ctl00_MPContent_txtUsername" class="text required ui-widget-content ui-corner-all" ItemStyle-CssClass="ui-widget-content" onKeyPress="doClick(&#39;ctl00_MPContent_btnLogin&#39;,event)" />
                            <br />
                <span id="ctl00_MPContent_lblPassword" ItemStyle-CssClass="ui-widget-content">Password:</span>
                <input name="ctl00$MPContent$txtPassword" type="password" id="ctl00_MPContent_txtPassword" class="text required ui-widget-content ui-corner-all" ItemStyle-CssClass="ui-widget-content" onKeyPress="doClick(&#39;ctl00_MPContent_btnLogin&#39;,event)" />
           
                <br />
                <br />
                <input type="submit" name="ctl00$MPContent$btnLogin" value="Login" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MPContent$btnLogin&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MPContent_btnLogin" class="ui-widget-content ui-corner-all" ItemStyle-CssClass="ui-widget-content" />
                <br />
                <br />
             </div>
        </div>
    
            <br class="clear" />
        </div>
    
        <br class="clear" />
    
    </div>
        </form>
    </body>
    </html>
    

    4. Do I need to have 'Microsoft Visual C++ 2010  x64 Redistributable or for x86? If you where would I obtain that download file from in the msdn license download website or where ever I would obtain that file from?

    Monday, September 25, 2017 2:06 PM