Runtime-fout Microsoft JScript: 'document.OverurenDecl.txtMedewerker' is empty or not

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asmx126453
    New Member
    • Sep 2008
    • 72

    Runtime-fout Microsoft JScript: 'document.OverurenDecl.txtMedewerker' is empty or not

    Hey Guys,

    i have a question about that error is there a specfick thing were the error on focus becase i have a DOTNET project and it shows on almost evry page that error if i whanne add something only the name of the document and txtbox is diferent on the other pages

    Pleas help me

    this is the compleet error Runtime-fout Microsoft JScript: 'document.Overu renDecl.txtMede werker' is empty or not an object
    Last edited by asmx126453; Oct 14 '08, 10:07 AM. Reason: adding error
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    It's difficult to say without seeing some code. Post your code.

    Comment

    • asmx126453
      New Member
      • Sep 2008
      • 72

      #3
      okey i have 2 pages were i am working from both aspx and he problery whants to take a value from a javascript

      well okey here is some of the code were i think the error is being caused

      OverurenDecl.as px this is the page were i whanne go to by the press of a button

      Code:
      <%@ Page language="c#" Inherits="DotNet.OverurenDecl" CodeFile="OverurenDecl.aspx.cs" %>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
      <HTML>
      	<HEAD>
      		<title>OverurenDecl</title>
      		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
      		<meta content="C#" name="CODE_LANGUAGE">
      		<meta content="JavaScript" name="vs_defaultClientScript">
      		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
      		<script language="javascript" src="AlgemeneFuncties.js"></script>
      		<script language="javascript">
      		function UpdateTotal()
      		{
      			var Total = 0;
      			var i;
      			for(i=0; document.getElementById('UpdateTijd' + i); i++)
      			{
      				Total = Total + document.getElementById('UpdateTijd' + i).value.replace(",",".") * 1;
      			}
      			Total = Total + document.OverurenDecl.NewTijd0.value.replace(",",".") * 1;
      			Total = Total + document.OverurenDecl.NewTijd1.value.replace(",",".") * 1;
      			Total = Total + document.OverurenDecl.NewTijd2.value.replace(",",".") * 1;
      			Total = Total + document.OverurenDecl.NewTijd3.value.replace(",",".") * 1;
      			Total = Total + document.OverurenDecl.NewTijd4.value.replace(",",".") * 1;
      			
      			document.OverurenDecl.txtTotaalTijd.value = Total;
      		}
      		
      		function CalcUren(TijdVan, TijdTot, Pauze, Tijd)
      		{
      			Tijd.readOnly = !Pauze;
      			if (Pauze)
      				return;
      			var Tijd1 = GetMin(TijdVan.value) * 1;
      			Tijd1 += GetUur(TijdVan.value) * 60;
      			var Tijd2 = GetMin(TijdTot.value) * 1;
      			Tijd2 += GetUur(TijdTot.value) * 60;
      			if (Tijd1 < 0 || Tijd2 < 0)
      				return;
      			Tijd.value = (Tijd2 - Tijd1) / 60;
      			TijdVan.value = Math.floor(Tijd1 / 60) + ":" + FixZero(Tijd1 % 60);
      			TijdTot.value = Math.floor(Tijd2 / 60) + ":" + FixZero(Tijd2 % 60);
      			UpdateTotal();
      		}
      		</script>
      		<LINK href="style.css" type="text/css" rel="stylesheet">
      	</HEAD>
      	<body onload="InitCombobox(document.OverurenDecl.txtMedewerker, document.OverurenDecl.ddlMedewerker);UpdateTotal();">
      		<form method="post" runat="server">
      			<h1>Overuren Declaratie</h1>
      			<asp:dropdownlist id="ddlMedewerker" style="Z-INDEX: 101; LEFT: 177px; POSITION: absolute; TOP: 86px" runat="server" AutoPostBack="True" Width="300px" onselectedindexchanged="ddlMedewerker_SelectedIndexChanged"></asp:dropdownlist>
      			<table width="728">
      				<tr>
      					<td style="WIDTH: 334px" align="right"><asp:imagebutton id="imgVerwijder" onfocus="this.blur()" tabIndex="23" runat="server" Visible="False" ImageUrl="images\verwijderen.gif"></asp:imagebutton></td>
      					<td style="WIDTH: 196px" align="right" width="196"><asp:imagebutton id="imgBtnEdit" tabIndex="24" runat="server" ImageUrl="images\opslaan.gif"></asp:imagebutton></td>
      					<td align="right" width="200"><asp:imagebutton id="imgAfdruk" tabIndex="25" runat="server" ImageUrl="images\VZprintenopslaan.gif"></asp:imagebutton></td>
      				</tr>
      			</table>
      			<br>
      			<table width="100%">
      				<tr>
      					<td>Medewerker</td>
      					<td colSpan="3"><asp:textbox id="txtMedewerker" onkeyup="javascript:KlantlijstChange(document.OverurenDecl.txtMedewerker, document.OverurenDecl.ddlMedewerker);" runat="server" Width="300px"></asp:textbox></td>
      				</tr>
      				<tr>
      					<td>Woonplaats</td>
      					<td colSpan="3"><asp:textbox id="txtWoonplaats" runat="server" Width="300px"></asp:textbox></td>
      				</tr>
      				<tr>
      					<td>BankNR</td>
      					<td><asp:textbox id="txtBankNR" runat="server"></asp:textbox></td>
      					<td align="right" rowSpan="2">Verrekenen:</td>
      					<td rowSpan="2"><asp:radiobuttonlist id="optVerreken" runat="server">
      							<asp:ListItem Value="0" Selected="True">Uitbetalen</asp:ListItem>
      							<asp:ListItem Value="1">Compenseren</asp:ListItem>
      						</asp:radiobuttonlist></td>
      				</tr>
      				<tr>
      					<td>GiroNR</td>
      					<td><asp:textbox id="txtGiroNR" runat="server"></asp:textbox></td>
      				</tr>
      				<tr>
      					<td>Datum Ingeleverd</td>
      					<td><asp:textbox id="txtDatum" runat="server"></asp:textbox></td>
      					<td align="right">Verwerkt:</td>
      					<td><asp:checkbox id="chkVerwerkt" runat="server"></asp:checkbox></td>
      				</tr>
      			</table>
      			<br>
      			<table cellSpacing="0" cellPadding="0">
      				<tr>
      					<th>
      						Datum</th>
      					<th>
      						Van</th>
      					<th>
      						Tot</th>
      					<th>
      						Relatie</th>
      					<th>
      						Pauze</th>
      					<th>
      						Tijd Totaal</th></tr>
      				<span id="TableSpan" runat="server"></span>
      				<tr>
      					<td><input type="text" size="10" name="NewDatum0"></td>
      					<td><input onblur="CalcUren(NewTijdVan0, NewTijdTot0, NewPauze0.checked, NewTijd0)" type="text" size="5" name="NewTijdVan0"></td>
      					<td><input onblur="CalcUren(NewTijdVan0, NewTijdTot0, NewPauze0.checked, NewTijd0)" type="text" size="5" name="NewTijdTot0"></td>
      					<td><input type="text" size="30" name="NewRelatie0"></td>
      					<td align="middle"><input onclick="CalcUren(NewTijdVan0, NewTijdTot0, NewPauze0.checked, NewTijd0)" type="checkbox" name="NewPauze0"></td>
      					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd0"></td>
      				</tr>
      				<tr>
      					<td><input type="text" size="10" name="NewDatum1"></td>
      					<td><input onblur="CalcUren(NewTijdVan1, NewTijdTot1, NewPauze1.checked, NewTijd1)" type="text" size="5" name="NewTijdVan1"></td>
      					<td><input onblur="CalcUren(NewTijdVan1, NewTijdTot1, NewPauze1.checked, NewTijd1)" type="text" size="5" name="NewTijdTot1"></td>
      					<td><input type="text" size="30" name="NewRelatie1"></td>
      					<td align="middle"><input onclick="CalcUren(NewTijdVan1, NewTijdTot1, NewPauze1.checked, NewTijd1)" type="checkbox" name="NewPauze1"></td>
      					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd1"></td>
      				</tr>
      				<tr>
      					<td><input type="text" size="10" name="NewDatum2"></td>
      					<td><input onblur="CalcUren(NewTijdVan2, NewTijdTot2, NewPauze2.checked, NewTijd2)" type="text" size="5" name="NewTijdVan2"></td>
      					<td><input onblur="CalcUren(NewTijdVan2, NewTijdTot2, NewPauze2.checked, NewTijd2)" type="text" size="5" name="NewTijdTot2"></td>
      					<td><input type="text" size="30" name="NewRelatie2"></td>
      					<td align="middle"><input onclick="CalcUren(NewTijdVan2, NewTijdTot2, NewPauze2.checked, NewTijd2)" type="checkbox" name="NewPauze2"></td>
      					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd2"></td>
      				</tr>
      				<tr>
      					<td><input type="text" size="10" name="NewDatum3"></td>
      					<td><input onblur="CalcUren(NewTijdVan3, NewTijdTot3, NewPauze3.checked, NewTijd3)" type="text" size="5" name="NewTijdVan3"></td>
      					<td><input onblur="CalcUren(NewTijdVan3, NewTijdTot3, NewPauze3.checked, NewTijd3)" type="text" size="5" name="NewTijdTot3"></td>
      					<td><input type="text" size="30" name="NewRelatie3"></td>
      					<td align="middle"><input onclick="CalcUren(NewTijdVan3, NewTijdTot3, NewPauze3.checked, NewTijd3)" type="checkbox" name="NewPauze3"></td>
      					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd3"></td>
      				</tr>
      				<tr>
      					<td><input type="text" size="10" name="NewDatum4"></td>
      					<td><input onblur="CalcUren(NewTijdVan4, NewTijdTot4, NewPauze4.checked, NewTijd4)" type="text" size="5" name="NewTijdVan4"></td>
      					<td><input onblur="CalcUren(NewTijdVan4, NewTijdTot4, NewPauze4.checked, NewTijd4)" type="text" size="5" name="NewTijdTot4"></td>
      					<td><input type="text" size="30" name="NewRelatie4"></td>
      					<td align="middle"><input onclick="CalcUren(NewTijdVan4, NewTijdTot4, NewPauze4.checked, NewTijd4)" type="checkbox" name="NewPauze4"></td>
      					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd4"></td>
      				</tr>
      				<tr>
      					<td align="right" colSpan="5">Totaal Tijd:
      					</td>
      					<td><asp:textbox id="txtTotaalTijd" runat="server" size="10" ReadOnly="True">0</asp:textbox></td>
      				</tr>
      			</table>
      			<br>
      			<table width="728">
      				<tr>
      					<td style="WIDTH: 334px" align="right"><asp:imagebutton id="imgDelete" onfocus="this.blur()" tabIndex="23" runat="server" Visible="False" ImageUrl="images\verwijderen.gif"></asp:imagebutton></td>
      					<td align="right"><asp:imagebutton id="btnSave" tabIndex="24" runat="server" ImageUrl="images\opslaan.gif"></asp:imagebutton></td>
      					<td align="right"><asp:imagebutton id="btnSavePrint" tabIndex="25" runat="server" ImageUrl="images\VZprintenopslaan.gif"></asp:imagebutton></td>
      				</tr>
      			</table>
      		</form>
      	</body>
      </HTML>
      this is the page were the button is to get 2 the page abbouve
      OverurenDecl_Ov erzicht.aspx

      Code:
      <%@ Reference Page="~/OverurenDecl.aspx" %>
      <%@ Page language="c#" Inherits="DotNet.OverurenDecl_Overzicht" CodeFile="OverurenDecl_Overzicht.aspx.cs" %>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
      <HTML>
      	<HEAD>
      		<title>OverurenDecl_Overzicht</title>
      		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
      		<meta name="CODE_LANGUAGE" Content="C#">
      		<meta name="vs_defaultClientScript" content="JavaScript">
      		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
      		<script language="javascript" src="AlgemeneFuncties.js"></script>
      		<LINK href="style.css" type="text/css" rel="stylesheet">
      	</HEAD>
      	<body>
      		<form method="post" runat="server">
      			<h1>Overuren Declaratie</h1>
      			<table width="80%">
      				<tr>
      					<td><asp:ImageButton id="imgbtnToevoegen" onfocus="this.blur()" runat="server" ImageUrl="images\toevoegen.gif"></asp:ImageButton>
      					</td>
      					<td align="right">Jaar:<asp:DropDownList id="DDLJaar" runat="server" AutoPostBack="True"></asp:DropDownList></td>
      				</tr>
      			</table>
      			<span id="TableSpan" runat="server"></span>
      		</form>
      	</body>
      </HTML>

      i dont now if you need more code like the javascript but i whont post i yet becase otherwise there will be a hole lot af code if you need more code from a other document just let me know

      Comment

      • asmx126453
        New Member
        • Sep 2008
        • 72

        #4
        maybe you whanne look true this code to the javascript it contains the function InitCombobox

        algemenefunctie s.js

        Code:
        //the text in textbox search in dropdownlist and adding the name if you whant from dropdownlist
        function KlantlijstChange(TextBox, DropDownBox)
        {
        	if (!TextBox || !DropDownBox)
        		return;
        	
        	if (( event.keyCode < 48  ||  event.keyCode > 57 ) && ( event.keyCode < 65 || event.keyCode > 90 ))
        		return;
        	
        	var Text = TextBox.value.toUpperCase();
        	var iLen = DropDownBox.options.length;
        	var iIndex;
        	var sCurrentText;
        	var bFound;
        
        	for (iIndex=0; iIndex<iLen; iIndex++)
        	{
        		sCurrentText = DropDownBox.options[ iIndex ].text;
        		sCurrentText = sCurrentText.toUpperCase();
        
        		bFound = (sCurrentText.indexOf(Text) == 0);
        		
        		if ( bFound )
        		{
        			TextBox.value = DropDownBox.options[ iIndex ].text;
        			
        			TextBox.focus();
        			TextBox.select();
        			
        			var oTextRange = TextBox.createTextRange();
        			oTextRange.moveStart("character", Text.length);
        			oTextRange.select();
        			
        			DropDownBox.selectedIndex = iIndex;
        			return;
        		}
        	}
        
        }
        
        //making sure the dropdownlist fals over the textbox
        //wich will make some kind of combobox
        function InitCombobox(Textbox, Dropdownlist)
        {
        	if (!Textbox || !Dropdownlist)
        		return;
        	Dropdownlist.style.position	= "absolute";
        	Dropdownlist.style.setExpression("pixelLeft", "absolute_X(" + Textbox.id + ")");
        	Dropdownlist.style.setExpression("pixelTop", "absolute_Y(" + Textbox.id + ")");
        	Dropdownlist.style.setExpression("clip","'rect(auto auto auto ' + (offsetWidth - 18) + ')'");
        }
        
        function absolute_X( theElement )
        {
        	var xPosition = 0;
        
        	while ( ( theElement != null ))// && (theElement.tagName != "TABLE"))
        	{
        		xPosition += theElement.offsetLeft;
        		theElement = theElement.offsetParent;
        	}
        
        	return xPosition;
        }
        
        function absolute_Y( theElement )
        {
        	var yPosition = 0;
        
        	while ( ( theElement != null ))// && (theElement.tagName != "TABLE"))
        	{
        		yPosition += theElement.offsetTop;
        		theElement = theElement.offsetParent;
        	}
        
        	return yPosition;
        }

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Post the client-side version of your ASP.NET code. Is your form named "OverurenDe cl"?

          Comment

          • asmx126453
            New Member
            • Sep 2008
            • 72

            #6
            uhm i know that the forms name is ctl00 but if i use that i still get the error dont realy know what you mean with client side but here is the aspx code from my OverurenDecl.as px how you look at the code in IE

            Code:
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
            <HTML>
            	<HEAD>
            		<title>OverurenDecl_Overzicht</title>
            		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
            		<meta name="CODE_LANGUAGE" Content="C#">
            		<meta name="vs_defaultClientScript" content="JavaScript">
            		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
            		<script language="javascript" src="AlgemeneFuncties.js"></script>
            		<LINK href="style.css" type="text/css" rel="stylesheet">
            	</HEAD>
            	<body>
            		<form name="ctl00" method="post" action="OverurenDecl_Overzicht.aspx" id="ctl00">
            <div>
            <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
            <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
            <input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
            <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNDQzODY0MjQwD2QWAgIBD2QWBAIDDxBkEBUHBDIwMDgEMjAwNwQyMDA2BDIwMDUEMjAwNAQyMDAzBEFsbGUVBwQyMDA4BDIwMDcEMjAwNgQyMDA1BDIwMDQEMjAwMwRBbGxlFCsDB2dnZ2dnZ2dkZAIFDxYCHglpbm5lcmh0bWwFpAI8dHI+PHRkIHZhbGlnbj10b3A+PGEgaHJlZj0iT3ZlcnVyZW5EZWNsLmFzcHg/SUQ9MTIiPjEyPC9hPjwvdGQ+PHRkIHZhbGlnbj10b3A+Jm5ic3A7PC90ZD48dGQgdmFsaWduPXRvcD4mbmJzcDs8L3RkPjx0ZCB2YWxpZ249dG9wPk5lZTwvdGQ+PC90cj48dHI+PHRoIGNsYXNzPSJCb3R0b20iPiZuYnNwOzwvdGg+PHRoIGFsaWduPSJyaWdodCIgY2xhc3M9IkJvdHRvbSI+VG90YWFsOiZuYnNwOzwvdGg+PHRoIGNvbHNwYW49IjIiIGFsaWduPSJsZWZ0IiBjbGFzcz0iQm90dG9tIj4wPC90aD48L3RyPjwvdGFibGU+ZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUPaW1nYnRuVG9ldm9lZ2Vuo+LLEindwkPB5ULdV4e73jpK3ls=" />
            </div>
            
            <script type="text/javascript">
            //<![CDATA[
            var theForm = document.forms['ctl00'];
            if (!theForm) {
                theForm = document.ctl00;
            }
            function __doPostBack(eventTarget, eventArgument) {
                if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                    theForm.__EVENTTARGET.value = eventTarget;
                    theForm.__EVENTARGUMENT.value = eventArgument;
                    theForm.submit();
                }
            }
            //]]>
            </script>
            
            
            <div>
            
            	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCgKDsdTtDAKMxcehAQL3rMbpBwLfgquJAgLfgofgBALfgpONDALfgq/WAwLfgrvzCgLfgtefAgKK46zhAQ/BbCqSPUSuSJ49qC+NCmxmOC40" />
            </div>
            			<h1>Overuren Declaratie</h1>
            			<table width="80%">
            				<tr>
            					<td><input type="image" name="imgbtnToevoegen" id="imgbtnToevoegen" onfocus="this.blur()" src="images\toevoegen.gif" style="border-width:0px;" />
            					</td>
            					<td align="right">Jaar:<select name="DDLJaar" onchange="javascript:setTimeout('__doPostBack(\'DDLJaar\',\'\')', 0)" id="DDLJaar">
            	<option selected="selected" value="2008">2008</option>
            	<option value="2007">2007</option>
            	<option value="2006">2006</option>
            	<option value="2005">2005</option>
            	<option value="2004">2004</option>
            	<option value="2003">2003</option>
            	<option value="Alle">Alle</option>
            
            </select></td>
            				</tr>
            			</table>
            			<span id="TableSpan"><tr><td valign=top><a href="OverurenDecl.aspx?ID=12">12</a></td><td valign=top>&nbsp;</td><td valign=top>&nbsp;</td><td valign=top>Nee</td></tr><tr><th class="Bottom">&nbsp;</th><th align="right" class="Bottom">Totaal:&nbsp;</th><th colspan="2" align="left" class="Bottom">0</th></tr></table></span>
            		</form>
            	</body>
            </HTML>

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              If that's the case, then wherever you have document.Overur enDecl replace with document.ct100 or document.forms['ct100']

              Comment

              • asmx126453
                New Member
                • Sep 2008
                • 72

                #8
                Nop srry dident work i still get the same error and the weird thing is that it looks like the error is show after </HTML>OverurenDe cl_Overzicht have any other idee's i can try

                Comment

                • acoder
                  Recognized Expert MVP
                  • Nov 2006
                  • 16032

                  #9
                  I think you've showed the client-side code for OverurenDecl_Ov erzicht.aspx. Show me the code for OverurenDecl.as px (what you posted in post #3, but the client-side version).

                  Comment

                  • asmx126453
                    New Member
                    • Sep 2008
                    • 72

                    #10
                    okey your right is see but the problem is that i cant look the code from my dotnet application thats offline there also is a online version of it that is working so i will post that code now but then there can be minor differences becase that is the code that is made in Visual Studio 7 and now i am changing it in 2005 hope you can use it

                    Code:
                    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
                    <HTML>
                    	<HEAD>
                    		<title>OverurenDecl</title>
                    		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
                    		<meta content="C#" name="CODE_LANGUAGE">
                    		<meta content="JavaScript" name="vs_defaultClientScript">
                    		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
                    		<script language="javascript" src="AlgemeneFuncties.js"></script>
                    		<script language="javascript">
                    		function UpdateTotal()
                    		{
                    			var Total = 0;
                    			var i;
                    			for(i=0; document.getElementById('UpdateTijd' + i); i++)
                    			{
                    				Total = Total + document.getElementById('UpdateTijd' + i).value.replace(",",".") * 1;
                    			}
                    			Total = Total + document.OverurenDecl.NewTijd0.value.replace(",",".") * 1;
                    			Total = Total + document.OverurenDecl.NewTijd1.value.replace(",",".") * 1;
                    			Total = Total + document.OverurenDecl.NewTijd2.value.replace(",",".") * 1;
                    			Total = Total + document.OverurenDecl.NewTijd3.value.replace(",",".") * 1;
                    			Total = Total + document.OverurenDecl.NewTijd4.value.replace(",",".") * 1;
                    			
                    			document.OverurenDecl.txtTotaalTijd.value = Total;
                    		}
                    		
                    		function CalcUren(TijdVan, TijdTot, Pauze, Tijd)
                    		{
                    			Tijd.readOnly = !Pauze;
                    			if (Pauze)
                    				return;
                    			var Tijd1 = GetMin(TijdVan.value) * 1;
                    			Tijd1 += GetUur(TijdVan.value) * 60;
                    			var Tijd2 = GetMin(TijdTot.value) * 1;
                    			Tijd2 += GetUur(TijdTot.value) * 60;
                    			if (Tijd1 < 0 || Tijd2 < 0)
                    				return;
                    			Tijd.value = (Tijd2 - Tijd1) / 60;
                    			TijdVan.value = Math.floor(Tijd1 / 60) + ":" + FixZero(Tijd1 % 60);
                    			TijdTot.value = Math.floor(Tijd2 / 60) + ":" + FixZero(Tijd2 % 60);
                    			UpdateTotal();
                    		}
                    		</script>
                    		<LINK href="style.css" type="text/css" rel="stylesheet">
                    	</HEAD>
                    	<body onload="InitCombobox(document.OverurenDecl.txtMedewerker, document.OverurenDecl.ddlMedewerker);UpdateTotal();" MS_POSITIONING="GridLayout">
                    		<form name="OverurenDecl" method="post" action="OverurenDecl.aspx" id="OverurenDecl">
                    <input type="hidden" name="__EVENTTARGET" value="" />
                    <input type="hidden" name="__EVENTARGUMENT" value="" />
                    <input type="hidden" name="__VIEWSTATE" value="dDw1NzQ0ODkzMjI7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8dDw7dDxpPDExPjtAPEFsbGVydCBWaXNzZXI7QW5nZWxhIFBvbDtBbml0YSBkZSBCb295O0VkaXRoIFZpc3NlcjtFcmljIHZhbiBIZWlqbnNiZXJnZW47RnJhbmsgdmFuIGRlbiBCZXJnO0hhbiBCcmVucztIZW5yeSBDaGFybGVzO0xvdWsgTGFhZ2xhbmQ7TWljaGllbCBXb3J0bWFuO3N1cHBvcnQ7PjtAPEFsbGVydCBWaXNzZXI7QW5nZWxhIFBvbDtBbml0YSBkZSBCb295O0VkaXRoIFZpc3NlcjtFcmljIHZhbiBIZWlqbnNiZXJnZW47RnJhbmsgdmFuIGRlbiBCZXJnO0hhbiBCcmVucztIZW5yeSBDaGFybGVzO0xvdWsgTGFhZ2xhbmQ7TWljaGllbCBXb3J0bWFuO3N1cHBvcnQ7Pj47Pjs7Pjs+Pjs+PjtsPGltZ0J0bkVkaXQ7aW1nQWZkcnVrO2Noa1Zlcndlcmt0O2J0blNhdmU7YnRuU2F2ZVByaW50Oz4+3/RzWmltkeq6bg3xRMmW61haTKw=" />
                    
                    <script language="javascript" type="text/javascript">
                    <!--
                    	function __doPostBack(eventTarget, eventArgument) {
                    		var theform;
                    		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
                    			theform = document.OverurenDecl;
                    		}
                    		else {
                    			theform = document.forms["OverurenDecl"];
                    		}
                    		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
                    		theform.__EVENTARGUMENT.value = eventArgument;
                    		theform.submit();
                    	}
                    // -->
                    </script>
                    
                    			<h1>Overuren Declaratie</h1>
                    			<select name="ddlMedewerker" onchange="__doPostBack('ddlMedewerker','')" language="javascript" id="ddlMedewerker" style="width:300px;Z-INDEX: 101; LEFT: 177px; POSITION: absolute; TOP: 86px">
                    	<option value="***">***</option>
                    	<option value="***">***</option>
                    	<option value="***">***</option>
                    	<option value="***">***</option>
                    	<option value="***">****</option>
                    	<option value="****">****</option>
                    	<option value="***">***</option>
                    	<option value="***">***</option>
                    	<option value="****">****</option>
                    	<option value="***">****</option>
                    	<option value="support">support</option>
                    
                    </select>
                    			<table width="728">
                    				<tr>
                    					<td style="WIDTH: 334px" align="right"></td>
                    					<td style="WIDTH: 196px" align="right" width="196"><input type="image" name="imgBtnEdit" id="imgBtnEdit" tabindex="24" src="images\opslaan.gif" alt="" border="0" /></td>
                    					<td align="right" width="200"><input type="image" name="imgAfdruk" id="imgAfdruk" tabindex="25" src="images\VZprintenopslaan.gif" alt="" border="0" /></td>
                    				</tr>
                    			</table>
                    			<br>
                    			<table width="100%">
                    				<tr>
                    					<td>Medewerker</td>
                    					<td colSpan="3"><input name="txtMedewerker" type="text" id="txtMedewerker" onkeyup="javascript:KlantlijstChange(document.OverurenDecl.txtMedewerker, document.OverurenDecl.ddlMedewerker);" style="width:300px;" /></td>
                    				</tr>
                    				<tr>
                    					<td>Woonplaats</td>
                    					<td colSpan="3"><input name="txtWoonplaats" type="text" id="txtWoonplaats" style="width:300px;" /></td>
                    				</tr>
                    				<tr>
                    					<td>BankNR</td>
                    					<td><input name="txtBankNR" type="text" id="txtBankNR" /></td>
                    					<td align="right" rowSpan="2">Verrekenen:</td>
                    					<td rowSpan="2"><table id="optVerreken" border="0">
                    	<tr>
                    		<td><input id="optVerreken_0" type="radio" name="optVerreken" value="0" checked="checked" /><label for="optVerreken_0">Uitbetalen</label></td>
                    	</tr><tr>
                    		<td><input id="optVerreken_1" type="radio" name="optVerreken" value="1" /><label for="optVerreken_1">Compenseren</label></td>
                    	</tr>
                    </table></td>
                    				</tr>
                    				<tr>
                    					<td>GiroNR</td>
                    					<td><input name="txtGiroNR" type="text" id="txtGiroNR" /></td>
                    				</tr>
                    				<tr>
                    					<td>Datum Ingeleverd</td>
                    					<td><input name="txtDatum" type="text" id="txtDatum" /></td>
                    					<td align="right">Verwerkt:</td>
                    					<td><input id="chkVerwerkt" type="checkbox" name="chkVerwerkt" /></td>
                    				</tr>
                    			</table>
                    			<br>
                    			<table cellSpacing="0" cellPadding="0">
                    				<tr>
                    					<th>
                    						Datum</th>
                    					<th>
                    						Van</th>
                    					<th>
                    						Tot</th>
                    					<th>
                    						Relatie</th>
                    					<th>
                    						Pauze</th>
                    					<th>
                    						Tijd Totaal</th></tr>
                    				<span id="TableSpan"></span>
                    				<tr>
                    					<td><input type="text" size="10" name="NewDatum0"></td>
                    					<td><input onblur="CalcUren(NewTijdVan0, NewTijdTot0, NewPauze0.checked, NewTijd0)" type="text" size="5" name="NewTijdVan0"></td>
                    					<td><input onblur="CalcUren(NewTijdVan0, NewTijdTot0, NewPauze0.checked, NewTijd0)" type="text" size="5" name="NewTijdTot0"></td>
                    					<td><input type="text" size="30" name="NewRelatie0"></td>
                    					<td align="middle"><input onclick="CalcUren(NewTijdVan0, NewTijdTot0, NewPauze0.checked, NewTijd0)" type="checkbox" name="NewPauze0"></td>
                    					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd0"></td>
                    				</tr>
                    				<tr>
                    					<td><input type="text" size="10" name="NewDatum1"></td>
                    					<td><input onblur="CalcUren(NewTijdVan1, NewTijdTot1, NewPauze1.checked, NewTijd1)" type="text" size="5" name="NewTijdVan1"></td>
                    					<td><input onblur="CalcUren(NewTijdVan1, NewTijdTot1, NewPauze1.checked, NewTijd1)" type="text" size="5" name="NewTijdTot1"></td>
                    					<td><input type="text" size="30" name="NewRelatie1"></td>
                    					<td align="middle"><input onclick="CalcUren(NewTijdVan1, NewTijdTot1, NewPauze1.checked, NewTijd1)" type="checkbox" name="NewPauze1"></td>
                    					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd1"></td>
                    				</tr>
                    				<tr>
                    					<td><input type="text" size="10" name="NewDatum2"></td>
                    					<td><input onblur="CalcUren(NewTijdVan2, NewTijdTot2, NewPauze2.checked, NewTijd2)" type="text" size="5" name="NewTijdVan2"></td>
                    					<td><input onblur="CalcUren(NewTijdVan2, NewTijdTot2, NewPauze2.checked, NewTijd2)" type="text" size="5" name="NewTijdTot2"></td>
                    					<td><input type="text" size="30" name="NewRelatie2"></td>
                    					<td align="middle"><input onclick="CalcUren(NewTijdVan2, NewTijdTot2, NewPauze2.checked, NewTijd2)" type="checkbox" name="NewPauze2"></td>
                    					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd2"></td>
                    				</tr>
                    				<tr>
                    					<td><input type="text" size="10" name="NewDatum3"></td>
                    					<td><input onblur="CalcUren(NewTijdVan3, NewTijdTot3, NewPauze3.checked, NewTijd3)" type="text" size="5" name="NewTijdVan3"></td>
                    					<td><input onblur="CalcUren(NewTijdVan3, NewTijdTot3, NewPauze3.checked, NewTijd3)" type="text" size="5" name="NewTijdTot3"></td>
                    					<td><input type="text" size="30" name="NewRelatie3"></td>
                    					<td align="middle"><input onclick="CalcUren(NewTijdVan3, NewTijdTot3, NewPauze3.checked, NewTijd3)" type="checkbox" name="NewPauze3"></td>
                    					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd3"></td>
                    				</tr>
                    				<tr>
                    					<td><input type="text" size="10" name="NewDatum4"></td>
                    					<td><input onblur="CalcUren(NewTijdVan4, NewTijdTot4, NewPauze4.checked, NewTijd4)" type="text" size="5" name="NewTijdVan4"></td>
                    					<td><input onblur="CalcUren(NewTijdVan4, NewTijdTot4, NewPauze4.checked, NewTijd4)" type="text" size="5" name="NewTijdTot4"></td>
                    					<td><input type="text" size="30" name="NewRelatie4"></td>
                    					<td align="middle"><input onclick="CalcUren(NewTijdVan4, NewTijdTot4, NewPauze4.checked, NewTijd4)" type="checkbox" name="NewPauze4"></td>
                    					<td><input onblur="UpdateTotal();" readOnly type="text" size="10" name="NewTijd4"></td>
                    				</tr>
                    				<tr>
                    					<td align="right" colSpan="5">Totaal Tijd:
                    					</td>
                    					<td><input name="txtTotaalTijd" type="text" value="0" readonly="readonly" id="txtTotaalTijd" size="10" /></td>
                    				</tr>
                    			</table>
                    			<br>
                    			<table width="728">
                    				<tr>
                    					<td style="WIDTH: 334px" align="right"></td>
                    					<td align="right"><input type="image" name="btnSave" id="btnSave" tabindex="24" src="images\opslaan.gif" alt="" border="0" /></td>
                    					<td align="right"><input type="image" name="btnSavePrint" id="btnSavePrint" tabindex="25" src="images\VZprintenopslaan.gif" alt="" border="0" /></td>
                    				</tr>
                    			</table>
                    		</form>
                    	</body>
                    </HTML>
                    Last edited by acoder; Nov 13 '08, 01:22 PM. Reason: Removed names

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      From what I can see, the latest code that you posted should work because the name of the form matches the name you're trying to access with using JavaScript.

                      Note the name of the form: OverurenDecl. If you rename the form "ct100" in the page that has the error to "OverurenDe cl", then it should also work.

                      Comment

                      • asmx126453
                        New Member
                        • Sep 2008
                        • 72

                        #12
                        okey so if you look at the code i posted on my first post id aksuly shud work

                        if you dont have any other solutions i have a qustion about VS 7 and 2005 becase i think the error is being created becase i converted the project 2005 and thats the only problem there is so than i maybe can start focusing on the thing that has changed in those version and then i maybe no how to change it
                        Last edited by asmx126453; Oct 15 '08, 09:58 AM. Reason: more info

                        Comment

                        • acoder
                          Recognized Expert MVP
                          • Nov 2006
                          • 16032

                          #13
                          I'm not sure if the versions of Visual Studio make a difference.

                          If the online version is working, but the offline one isn't, look at the differences between the two. Note, for example, that in post #6 the form name is "ct100" (not working) while in post #10, it's called "OverurenDe cl" (working).

                          Comment

                          • asmx126453
                            New Member
                            • Sep 2008
                            • 72

                            #14
                            I still have 1 question if you cud help me with finding a span id name becase i cant find a name anywhere not in my code from the project or in the client version of it if i use a span id were whud the name of it be written

                            Comment

                            • acoder
                              Recognized Expert MVP
                              • Nov 2006
                              • 16032

                              #15
                              I notice in your code, you have:
                              Code:
                              <span id="TableSpan">
                              Is that the span you're referring to?

                              Comment

                              Working...