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
This is the code out my javascript code
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
Code:
<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
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) + ')'");
}
Comment