Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Mobile / November 2004

Tip: Looking for answers? Try searching our database.

SetFocus on Load

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don Schilling - 10 Nov 2004 01:07 GMT
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());

}
William Main - 21 Nov 2004 06:54 GMT
It appears as though JavaScript is not exported to the web page from the aspx
age. I've even hard coded script into the aspx page and no luck, the HTML
page has no script in it. I suspect it has to do with the xml.dtd that is
referenced in the generated HTML page (also not ther is never a <HTML></HTML>
tag pair in the output  either).

I've had to resort to using standard ASPX and not the MOBILE ASPX page type.

William main

> 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
[quoted text clipped - 31 lines]
>
> }
Don Schilling - 22 Nov 2004 16:30 GMT
Using aspx rather than mobile wont help in this case.  Java script is not
supported on the client, so it dosent matter what server method is used.

> It appears as though JavaScript is not exported to the web page from the aspx
> age. I've even hard coded script into the aspx page and no luck, the HTML
[quoted text clipped - 41 lines]
> >
> > }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.