I am having some big troubles here i tryd solving it myself with internet for 2 days but i kind fix it.
Its about this i have a DotNet project that alrydi is online and working for almost everything.
but it whas made in Visual Studio 7 and i converted it to 2005. in version 7 it works almost perfect but in 2005 i am having some errors.
becase all the code i am using is very long i am trying to post the nesecery code only if you need more just tell me
The ERROR is this: Runtime-fout Microsoft JScript: 'document.WerkbonOverzicht.txtKlant1' is empty or not ann object
the thing i whant to make work again is this: i have 1 Textbox and 1 Dropdownlist and the dropdownlist gets information from a database with a lot of names.
the thing i whanne get to work again is that if i typ a letter in my txtbox it gets the name from the dropdownlist.
All the programmig code is good becase it works in the online version. and the error points at the end of the document after </html>
i personly thin the error is somewere in the 2 rules of body onloud and form id tag.
this whas the code in Visual Studio 7 working online
WerkbonOverzicht.aspx
Expand|Select|Wrap|Line Numbers
- <%@ Page language="c#" Codebehind="WerkbonOverzicht.aspx.cs" AutoEventWireup="false" Inherits="DotNet.WerkbonOverzicht" debug="False"%>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
- <HTML>
- <HEAD>
- <LINK href="style.css" type="text/css" rel="stylesheet">
- <script language="javascript" src="AlgemeneFuncties.js"></script>
- </HEAD>
- <body onload="InitCombobox(document.WerkbonOverzicht.txtKlant1, document.WerkbonOverzicht.DDLKlant1);">
- <form id="WerkbonOverzicht" method="post" runat="server">
- <P>
- <asp:Button id="btnNada" runat="server" Width="1px" BorderColor="#567C9C" BackColor="#567C9C" BorderStyle="None" Height="1px"></asp:Button><asp:dropdownlist id="DDLKlant1" runat="server" AutoPostBack="True" Width="246px"></asp:dropdownlist></P>
- <P><asp:imagebutton id="imgbtnToevoegen" onfocus="this.blur()" runat="server" ImageUrl="images\toevoegen.gif" DESIGNTIMEDRAGDROP="30"></asp:imagebutton></P>
- <P><asp:button id="btnReset" runat="server" BorderColor="Red" BackColor="Red" Text="Reset"></asp:button></TD></P>
- <P>
- <table cellSpacing="1" cellPadding="0" width="70%">
- <tr>
- <td>Jaar:</td>
- <td>Klant:</td>
- <td>Werknemer:</td>
- <td>Aantal rijen:</td>
- <td>Datum:</td>
- </tr>
- <tr>
- <td><asp:dropdownlist id="DDLJaartal1" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
- <td><asp:textbox id="txtKlant1" runat="server" Width="247px"></asp:textbox></td>
- <td><asp:dropdownlist id="DDLWerkn1" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
- <td><asp:dropdownlist id="DDLRecord1" runat="server" AutoPostBack="True" Width="90px"></asp:dropdownlist></td>
- <td><asp:dropdownlist id="DDLDesc1" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
- </tr>
- </table>
- </P>
- <table cellSpacing="1" cellPadding="0" width="90%">
- <tr>
- <th>
- ID</th>
- <th>
- Naam klant</th>
- <th>
- Datum</th>
- <th>
- Medewerker</th>
- <th>
- Omschrijving</th>
- <th>
- Uren</th>
- <th>
- Factuur</th></tr>
- <span id="TableSpan" runat="server"></span>
- <tr>
- <td colSpan="6"> </td>
- </tr>
- </table>
- </form>
- </body>
- </HTML>
WerkbonOverzicht.aspx
Expand|Select|Wrap|Line Numbers
- <%@ Page language="c#" Inherits="DotNet.WerkbonOverzicht" debug="False" CodeFile="WerkbonOverzicht.aspx.cs" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
- <HTML>
- <HEAD>
- <LINK href="style.css" type="text/css" rel="stylesheet">
- <script language="javascript" src="AlgemeneFuncties.js"></script>
- </HEAD>
- <body onload="InitCombobox(document.span2.txtKlant1, document.span2.DDLKlant1);">
- <form name="WerkbonOverzicht" method="post" action="WerkbonOverzicht.aspx" id="WerkbonOverzicht">
- <P>
- <asp:Button id="btnNada" runat="server" Width="1px" BorderColor="#567C9C" BackColor="#567C9C" BorderStyle="None" Height="1px" onclick="btnNada_Click"></asp:Button><asp:dropdownlist id="DDLKlant1" runat="server" AutoPostBack="True" Width="246px" onselectedindexchanged="DDLKlant1_SelectedIndexChanged"></asp:dropdownlist></P>
- <P><asp:imagebutton id="imgbtnToevoegen" onfocus="this.blur()" runat="server" ImageUrl="images\toevoegen.gif"></asp:imagebutton></P>
- <P><asp:button id="btnReset" runat="server" BorderColor="Red" BackColor="Red" Text="Reset" onclick="btnReset_Click"></asp:button></P>
- <P>
- <table cellSpacing="1" cellPadding="0" width="70%">
- <tr>
- <td>Jaar:</td>
- <td>Klant:</td>
- <td>Werknemer:</td>
- <td>Aantal rijen:</td>
- <td>Datum:</td>
- </tr>
- <tr>
- <td><asp:dropdownlist id="DDLJaartal1" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
- <td><asp:textbox id="txtKlant1" runat="server" AutoPostBack="True" Width="247px" ontextchanged="txtKlant1_TextChanged"></asp:textbox></td>
- <td><asp:dropdownlist id="DDLWerkn1" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
- <td><asp:dropdownlist id="DDLRecord1" runat="server" AutoPostBack="True" Width="90px"></asp:dropdownlist></td>
- <td><asp:dropdownlist id="DDLDesc1" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
- </tr>
- </table>
- </P>
- <table cellSpacing="1" cellPadding="0" width="90%">
- <tr>
- <th>
- ID</th>
- <th>
- Naam klant</th>
- <th>
- Datum</th>
- <th>
- Medewerker</th>
- <th>
- Omschrijving</th>
- <th>
- Uren</th>
- <th>
- Factuur</th></tr>
- <tr>
- <td><span id="TableSpan" runat="server"></span></td>
- </tr>
- <tr>
- <td colSpan="6"> </td>
- </tr>
- </table>
- </form>
- </body>
- </HTML>
greets