![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
There was an article about setting the focus in a mobile page with this code: mobile:Panel id="Panel1" runat="server" mobile eviceSpecific id="DeviceSpecific1" Runat="server"Choice Filter="isHTML32" contenttemplate Script for='window' event='onload' language='jscript' window.Form1.TB_Location.focus(); /Script /contenttemplate /Choice /mobile eviceSpecific/mobile:Panel This works on my page, but I want to make a page with more than one textbox for scanning purpose. Like order numer, article, etc. I tried to use RegisterStartupScript, with this code: private void SetFocus(Control FocusControl) { string ClientID = FocusControl.ClientID; System.Text.StringBuilder ScrFocus = new System.Text.StringBuilder(); ScrFocus.Append("<script for='window' event='onload' language='jscript'>"); ScrFocus.Append("window.Form1."); ScrFocus.Append(ClientID); ScrFocus.Append(".focus();"); ScrFocus.Append("</script>"); this.RegisterStartupScript("SetFocus",ScrFocus.ToS tring()); } So I can call after scanning the first barcode for textbox1 SetFocus(textbox2); etc etc. But the code isn't working. Is there anyone who nows how and where in my code I can call this script so I can set the focus of the cursor in the next textbox after scanning? With kind regards, G. Mengerink |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Thanks for replying. I'm using an HP iPaq 6915 with windows mobile 5.0 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |