D
Don Schilling
How can I set the focus on a textbox for Pocket PC mobile 2003?
On load I would like focus on text box so a bar code can be scanned without
any keypading.
I'm currently using C# in Visual Studio to create either a mobile or web
app.
I've tried javascript, looked at WML, but no luck.
As a side note, I cant seem to find a definitve answer to what javascript is
supported on Pocket PC.
Because of the device I'm using, a Symbol device using a an ARM Xscale
processor, I havent been able to find a third party browser.
Below is the java script I've tried. tbScan is the textbox I would like to
have focus.
I've spent a good chunk of time searching the web for an answer, but most of
the stuff out there is half baked.
TIA
Don
System.Text.StringBuilder sb = new System.Text.StringBuilder("");
sb.Append("<script language='JavaScript'>");
sb.Append("document.getElementById('" + this.tbScan.ClientID +
"').focus();<");
sb.Append("/");
sb.Append("script>");
if (!IsStartupScriptRegistered("Focus"))
{
this.RegisterStartupScript("Focus", sb.ToString());
}
On load I would like focus on text box so a bar code can be scanned without
any keypading.
I'm currently using C# in Visual Studio to create either a mobile or web
app.
I've tried javascript, looked at WML, but no luck.
As a side note, I cant seem to find a definitve answer to what javascript is
supported on Pocket PC.
Because of the device I'm using, a Symbol device using a an ARM Xscale
processor, I havent been able to find a third party browser.
Below is the java script I've tried. tbScan is the textbox I would like to
have focus.
I've spent a good chunk of time searching the web for an answer, but most of
the stuff out there is half baked.
TIA
Don
System.Text.StringBuilder sb = new System.Text.StringBuilder("");
sb.Append("<script language='JavaScript'>");
sb.Append("document.getElementById('" + this.tbScan.ClientID +
"').focus();<");
sb.Append("/");
sb.Append("script>");
if (!IsStartupScriptRegistered("Focus"))
{
this.RegisterStartupScript("Focus", sb.ToString());
}