hey guys can somonehelp
i got an error on rule 3 and it says error: txtbox is empty or not an object
this is the code out my aspx page - <script language="javascript" src="AlgemeneFuncties.js"></script>
-
</HEAD>
-
<body onload="InitCombobox(document.VerzamelbladOverzicht.txtKlant1, document.VerzamelbladOverzicht.DDLKlant1);">
-
<form id="Span2" runat="server">
-
<P><SPAN id="Form1" runat="server">
This is the code out my javascript code - //De met textbox zoeken in combobox functie
-
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;
-
}
-
}
-
DropDownBox.selectedIndex = 0;
-
return;
-
}
-
-
// De onderstaande functies zorgen ervoor dat de textbox over de Dropdown list valt,
-
// waardoor er een soort van Combobox onstaat
-
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) + ')'");
-
}
22 7452 JosAH 11,448
Recognized Expert MVP
This is the Java forum, not the Javascript forum; I'll move the question.
kind regards,
Jos
acoder 16,027
Recognized Expert Moderator MVP
Show the HTML code for the form elements.
well that one i probely solved by removing the code between the () after initcombobox becase he dident show any more error but i am having trouble with this - <table cellSpacing="1" cellPadding="0" width="90%">
-
<tr>
-
<th>
-
Datum</th>
-
<th>
-
klant</th>
-
<th>
-
Referentie</th>
-
<th>
-
Omschrijving</th></tr>
-
<span id="TableSpan" runat="server"></span>
-
<tr>
-
<td align="right" colSpan="4"> </td>
-
</tr>
-
</table>
it says that Validation (Internet Explorer 6): Element 'span' cannot be nested within element 'table
and i tyd a lot of others like div, lang ect but they al dont work and i need that code in it to have the information from my database displayed in a orderd way. anyone now another tag do put in stead of SPAN(Rule 11)
PS. i am srry that i put it onther the wrong head again
acoder 16,027
Recognized Expert Moderator MVP
Put the span inside a table cell, otherwise it will be invalid HTML.
Put the span inside a table cell, otherwise it will be invalid HTML.
Tanx did solved the first error but nog i have 2 more questions about the same lap of code:
all the errors are from my aspx webpage both errors give me the same text that says: document.Verzam elbladOverzicht .txtKlant1' is leeg of geen object
and the error points at Rule 5 and onther error points at the end of the HTML tag verry weird if you ask me if anyone has a solution that whoud be perfect Tanx guys
acoder 16,027
Recognized Expert Moderator MVP
Can you translate that error message into English for me?
It'd also be a good idea to post your form code for the text box and drop down box.
acoder 16,027
Recognized Expert Moderator MVP
Rather than the code from a different document, post the code from the same page, but the client-side version, i.e. when you view source in the browser.
i am not realy sure what you mean now but here is the ASPX.CS code (if i look at the page in the browser you will only see 3 links becase it works with frames) - using System;
-
using System.Collections;
-
using System.ComponentModel;
-
using System.Data;
-
using System.Drawing;
-
using System.Web;
-
using System.Web.SessionState;
-
using System.Web.UI;
-
using System.Web.UI.WebControls;
-
using System.Web.UI.HtmlControls;
-
-
//0=OfferteID;1=Datum;2=Omschrijving;
-
namespace DotNet
-
{
-
/// <summary>
-
/// Summary description for OfferteOverzicht.
-
/// </summary>
-
public partial class VerzamelbladOverzicht : System.Web.UI.Page
-
{
-
#region Controlls
-
-
protected System.Web.UI.HtmlControls.HtmlGenericControl Span4;
-
protected System.Web.UI.HtmlControls.HtmlGenericControl Span6;
-
protected System.Web.UI.HtmlControls.HtmlGenericControl Span5;
-
#endregion
-
-
public void GetData()
-
{
-
string[][] sOfferte;
-
localhost1.dbConnection dbConn = new localhost1.dbConnection();
-
-
bool desc;
-
if(DDLDesc1.SelectedItem.Text == "Aflopend")
-
desc = true;
-
else
-
desc = false;
-
-
sOfferte = dbConn.GetVerzamelbladOverzicht(DDLJaartal1.SelectedItem.Text, DDLKlant1.SelectedItem.Text, DDLRecord1.SelectedItem.Text, desc);
-
-
string ClassProp = "";
-
TableSpan.InnerHtml = "";
-
foreach (string[] sOfferteItem in sOfferte)
-
{
-
TableSpan.InnerHtml += "<tr>";
-
TableSpan.InnerHtml += "<td valign=top"+ClassProp+">" + (Functions.DateToNL(sOfferteItem[2])).Replace("-","/") + " </td>";
-
TableSpan.InnerHtml += "<td valign=top"+ClassProp+">" + sOfferteItem[0] + "</td>";
-
TableSpan.InnerHtml += "<td valign=top"+ClassProp+"><a onfocus=\"this.blur()\" href=\"VerzamelStatus.aspx?ID=" + sOfferteItem[1] + "\">" + sOfferteItem[1] + "</a></td>";
-
TableSpan.InnerHtml += "<td valign=top"+ClassProp+">" + sOfferteItem[3] + "</td>";
-
TableSpan.InnerHtml += "</tr>";
-
if (ClassProp == "")
-
ClassProp = " CLASS=\"ALT\"";
-
else
-
ClassProp = "";
-
}
-
}
-
-
protected void Page_Load(object sender, System.EventArgs e)
-
{
-
if (((bool)Session["ingelogd"] == false) || ((bool)Session["Medewerker"] == false))
-
Server.Transfer("redirect.aspx");
-
else
-
{
-
if(!IsPostBack)
-
{
-
DDLJaartal1.Items.Clear();
-
int HuidigJaar = System.Convert.ToInt32(Functions.GetDate().Substring(0, 4));
-
DDLJaartal1.Items.Add("Alle jaartallen");
-
for (int i = 2003; i <= HuidigJaar; i++)
-
{
-
DDLJaartal1.Items.Add(i.ToString());
-
}
-
-
localhost1.dbConnection dbConn = new localhost1.dbConnection();
-
-
string[] KlantenArray = dbConn.GetKlantLijst();
-
DDLKlant1.Items.Add("Alle klanten");
-
for(int i = 0;i < KlantenArray.Length; i++)
-
{
-
DDLKlant1.Items.Add(KlantenArray[i].ToString());
-
}
-
-
DDLRecord1.Items.Add("25");
-
DDLRecord1.Items.Add("50");
-
DDLRecord1.Items.Add("Alles");
-
-
DDLDesc1.Items.Add("Aflopend");
-
DDLDesc1.Items.Add("Oplopend");
-
}
-
-
txtKlant1.Attributes.Add("onKeyUp","javascript:KlantlijstChange(document.VerzamelbladOverzicht.txtKlant1, document.VerzamelbladOverzicht.DDLKlant1);");
-
GetData();
-
}
-
-
}
-
-
#region Web Form Designer generated code
-
override protected void OnInit(EventArgs e)
-
{
-
//
-
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
-
//
-
InitializeComponent();
-
base.OnInit(e);
-
}
-
-
/// <summary>
-
/// Required method for Designer support - do not modify
-
/// the contents of this method with the code editor.
-
/// </summary>
-
private void InitializeComponent()
-
{
-
this.imgbtnToevoegen.Click += new System.Web.UI.ImageClickEventHandler(this.imgbtnToevoegen_Click);
-
-
}
-
#endregion
-
-
private void imgbtnToevoegen_Click(object sender, System.Web.UI.ImageClickEventArgs e)
-
{
-
Server.Transfer("Verzamelblad.aspx?ID=0&CODE=0");
-
}
-
-
protected void btnDoNix_Click(object sender, System.EventArgs e)
-
{
-
BlockEnter();
-
}
-
-
private void BlockEnter()
-
{
-
//functie voor het vangen van enter op txtKlant1
-
//anders wordt imgbtnToevoegen geactiveerd en nu btnDoNix die hetzelfde doet als
-
//txtKlant1_TextChanged
-
DDLKlant1.SelectedItem.Text = txtKlant1.Text;
-
}
-
-
protected void txtKlant1_TextChanged(object sender, System.EventArgs e)
-
{
-
DDLKlant1.SelectedItem.Text = txtKlant1.Text;
-
}
-
-
protected void DDlKlant1_SelectedIndexChanged(object sender, System.EventArgs e)
-
{
-
txtKlant1.Text = DDLKlant1.SelectedItem.Text;
-
GetData();
-
}
-
-
protected void btnReset_Click(object sender, System.EventArgs e)
-
{
-
DDLJaartal1.SelectedIndex = 0;
-
DDLKlant1.SelectedIndex = 0;
-
txtKlant1.Text = "Alle klanten";
-
DDLRecord1.SelectedIndex = 0;
-
DDLDesc1.SelectedIndex = 0;
-
GetData();
-
}
-
-
}
-
}
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Harry |
last post by:
Hi,
Just seeing if anyone can help me with a problem I am having with drop
down lists.
- I have a asp:dropdownlist that gets its values from a database.
- The user then selects a value then presses the submit button.
- The submit button then calls a function that sets a asp:lable to
that value selected.
- PROBLEM: No matter what value the user selects, the asp:lable always
|
by: Stephen Adam |
last post by:
Hi there,
I'm sure i'm missing something really simple here, all i want to do is get
the value of the selected item in a list box. Even after much fiddling about
last night I still could not get my code to work. Below is some code which
highlights my problem. All I want to do is set the lable control's text
property to the value of the selected drop down list value - in this example
i've shown the three ways i've tried.
Please help!
|
by: Jim in Arizona |
last post by:
I'm going insane! I don't know if it's just that the .net 2.0 framework is
buggy or if it really is my code.
This is pretty hard to explain since I can't even begin to nail down why
this is happening.
I have two text boxes. One is for the ID number, which when postback occurs,
inserts into the related table as the foreign key.
The other text box is for notes that go along side the foreign key of the
the related table. Basically, the...
|
by: Boki |
last post by:
Hi All,
// code start
alert("document.all.txtbox"+valueA+".value")
// end code
could you please advice,
can it show the value of txtbox ?
|
by: cipher2079 |
last post by:
how can I use two txtbox to enter aphanumeric value and taking the first value of the textbox and placing it in the second txtbox with the numbers value being change to the actual wording (1,2 changes to one, two).
| |
by: imranabdulaziz |
last post by:
Dear All,
I am mess with one situation let me explain the scenario.
I am making search form where I display 15 field in checkboxlist and user select one or two or three or any no to all field. Depending on his selection (he tick the field and click filter button ) Now in filter button click I create label and dropdownlist control(populated from database) and add it to placeholder control. Now I select value and click the search button. Now...
|
by: HHAAPPYY |
last post by:
Hi
I am trying to pass value of the textbox along with another value to the query string.
when i am retriving the txtbox value it always shows me null,
my senario is like this
On my page div_admin.asp i have following things.<%
Dim page, content,console,banner,navbar
|
by: asmx126453 |
last post by:
Hey mensen
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...
|
by: mailbox73 |
last post by:
Hi,
c# 2008 express edition.
Can anyone please help me figure out why I cannot get any value from one form to another when the controls are databound. (the formY.txtbox lands up empty)
in formY I write in the load event:
Formx frmx = new Formx();
txtCustomer.Text = frmx.customerIdTextBox.Text;
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |