Advertisement

07.09.2008 at 08:11AM PDT, ID: 23550567
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.7

asp, Windows CE, setting focus to a text box on load and reload

Asked by Chuck_aa in Active Server Pages (ASP), FrontPage-Expressions

Tags: , ,

I'm using Classic ASP on a Windows 2000 server to direct a handheld running Wiindows CE to input a barcode scan to SQL. My problem is that I can't set focus to the input textbox on the hand held scanner. My code below is using a java script to reset focus and it works on my desktop IE 6 and 7 however it dosn't work for the hand held.

Chuck

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Scan Bags</title>
<!-- #Include Virtual = "ASPMaster.asp" -->
<!-- #Include Virtual = "CityMaster.asp" -->
<% Step = Request.QueryString("Step") %>
<% If Step = "" Then Step = "Scan" %>
<% M = Request.QueryString("M") %>
<SCRIPT LANGUAGE="JavaScript">

<!--
Begin
 function putFocus(formInst, elementInst) {
  if (document.forms.length > 0) {
   document.forms[formInst].elements[elementInst].focus();
  }
 }
 
// The second number in the "onLoad" command in the body
// tag determines the form's focus. Counting starts with '0'
// DON'T FORGET TO LOOK AT THE BODY TAG FOR THE KEY TO THIS SCRIPT
  End
-->


</script>
<style>
<!--
div.Section1
      {page:Section1;}
-->
</style>

</head>
<BODY onload="PutFocus(0,0);" topmargin="0" leftmargin="0" >



<%

If Step = "Scan" Then %>
<% If Request.Form("ScanLocation") <> "" Then %>
<% Session("ScanLocation") = Request.Form("ScanLocation") %>
<% End If %>
<% 'If Session("ScanLocation") = "" Then Session("ScanLocation") = Session("ScanLocation") %>
<form  method="POST" action="Scan.asp?City=<% = Session("City") %>&Step=Insert" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1" >
<table>
<tr>
<td align=left colspan="2" style="border: 1 solid #000000"><b><font face="Verdana" size="3">Scan Bags</font></b></td>
</tr>
<tr>
<td align=left colspan="2"><% = session("city") %>/<% = Session("ScanLocation") %></td>
</tr>
<tr>
<td align=left><font size="1" face="Trebuchet MS">Scan Bag Or<br>
Manually Input<br>
 10-Digit Tag Number</font></td>
      <td>
      &nbsp;<!--webbot bot="Validation" s-display-name="FullTag" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-minimum-length="10" i-maximum-length="10" --><INPUT  type=text name=BagTag size=10 maxlength=10 stiscan="ABCDEFGHIJKL" stisubmit tabindex=0 class="Section1" id="0" ></td>
</tr>
<% If M = "Accepted" Then %>
<tr>
<td align=left colspan="2" bgcolor="#000000"><b><font color="#FFFFFF" face="Verdana">Scan Accepted!</font></b></td>
</tr>
<% End If %>
</table>

<table>
</form>
<% End If %>
<% If Step = "Insert" Then %>
<% FullTag = Request.Form("BagTag") %>
<% If Session("City") = "" Then Response.Redirect "http://rovingagent.aa.com" %>
<% If FullTag = "" Then Response.Redirect "http://rovingagent.aa.com" %>
<% If Session("ScanLocation") = "" Then Response.Redirect "http://rovingagent.aa.com" %>
<%      Dim Obj
      Dim RS
      Dim CM
      Dim CN
      Set CN = Server.CreateObject("ADODB.Connection")
      Set CM = Server.CreateObject("ADODB.Command")
      Set RS = Server.CreateObject("ADODB.RecordSet")

      strSQL = "sp_insert_tblscan_manual"
      CN.Open Application("CITY_TODAY")
      CM.ActiveConnection = CN
      CM.CommandText = strSQL
      CM.CommandType = adCmdStoredProc
      CM.Parameters.Append CM.CreateParameter("City", adVarChar, adParamInput, 3, UCASE(Session("City")))
      CM.Parameters.Append CM.CreateParameter("FullTag", adVarChar, adParamInput, 10, FullTag)
      CM.Parameters.Append CM.CreateParameter("Location", adVarChar, adParamInput, 10, Session("ScanLocation"))
      CM.Execute

            Response.Redirect "http://0.0.0.0/scan/scan.asp?Step=Scan&M=Accepted"

%>
<% End If %>
<td><b><font face="MS Sans Serif" size="3">Also</font></b>
<p><a href="http://0.0.0.00/index.asp?City=<% = Session("City") %>"><font face="MS Sans Serif" size="2">Home</font></a><font face="MS Sans Serif" size="2">
|<a href="Location.asp?City=<% = Session("City") %>&amp;SC=None">Change Scan Location</a></font></p>
<td>
</table>
</body>












Start Free Trial
[+][-]07.09.2008 at 10:37AM PDT, ID: 21966211

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 10:38AM PDT, ID: 21966220

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.10.2008 at 08:54AM PDT, ID: 21974669

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.10.2008 at 09:19AM PDT, ID: 21974962

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.10.2008 at 09:22AM PDT, ID: 21974992

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.10.2008 at 10:00AM PDT, ID: 21975435

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.10.2008 at 03:01PM PDT, ID: 21977764

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 07:55AM PDT, ID: 22016542

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 07:57AM PDT, ID: 22016561

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:33AM PDT, ID: 22023650

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:15PM PDT, ID: 22030425

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), FrontPage-Expressions
Tags: asp, Windows CE, setting focus on a
Sign Up Now!
Solution Provided By: brundo
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628