Hello, I found some script which allows me to
emulate "type down" functionality on a dropdown box in a vb.Net program.
When I load it into my project I get a message box pop up
which the script is loaded which says "Expected ")". It
looks well formed to me. Here is the function
function divert_entry()
{
obj = window.event.srcElement;
//debugger;
if (obj.getAttribute("persistValue") == null)
obj.setAttribute("persistValue","");
var iKey;
var eAny_Event = window.event;
iKey = eAny_Event.keyCode;
var sChr = String.fromCharCode(iKey);
if (iKey == 13)
{
obj.setAttribute("persistValue","");
return true;
}
if (iKey == 8)
{
sDelete_Chr = obj.getAttribute("persistValue");
obj.setAttribute("persistValue",
sDelete_Chr.substring(0,sDelete_Chr.length - 1));
sChr = '';
}
obj.setAttribute
("persistValue",obj.getAttribute("persistValue" ) + sChr);
lookupItem(obj);
if (((iKey > 33 && iKey < 255) || (iKey
== 8)) && (iKey ! = 40) && (iKey != 38))
eAny_Event.returnValue = false;
}
What actually highlights in the error is the call to the
function which is loaded as follows:
drpNumbers.Attributes.Add("onkeydown", "return divert_entry()")
It highlights the "return divert_entry()"
Any ideas why?
..