?
Solved

Keeping control characters in inputbox

Posted on 2006-11-27
5
Medium Priority
?
197 Views
Last Modified: 2010-04-06
Problem:
We have a barcode scanner, running Windows CE 4.01. When our web page requests a scan, we can aim the scanner at a barcode, pull the trigger, and the code is automatically entered into the input field by going through the clipboard. However, the barcode contains some non-displayable control codes (ASCII &h1D and &h1E) as field separators. These are stripped out when the data hits the inputbox. I know the codes are there, because the test program for the scanner will display them as small squares in the text. I know the page itself will handle the codes, because I can cut and paste a dummy record into the input and the control codes appear as small squares.
Question: How do I get the control codes to copy in with the rest of the barcode?
0
Comment
Question by:SCHale
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 18021472
Try

<html>
<head>
<script>
saveVal=""
function show() {
  var val = document.forms[0].barcode_entry.value
  if (val !=saveVal) {
    document.getElementById('showDiv').innerHTML='<xm'+'p>'+escape(val)+'</xmp>';
  }
}
</script>
</head>
<body onLoad="setInterval('show()',200)">
<form>
<input type="text" name="barcode_entry" value="">
</form>
<div id="showDiv"></div>
</body>
</html>
0
 

Author Comment

by:SCHale
ID: 18033381
Thanks for replying. Today is Tuesday. I won't be able to test this until tomorrow or Thursday, but I think I understand what you are trying to do here.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 18035289
I just need to see if the field really contains the data or if the barcode software or something strips them before they hit the field
0
 

Author Comment

by:SCHale
ID: 18098770
I know the scanner reads the control codes, because the test program will show the characters as squares in its textbox display. This also indicates that, since the test software uses the same method of acquiring the data as the web page (through the clipboard), the control code are also in the clipboard. Somehow they are being lost in transit from the clipboard to the web page.
As usual, my priorities have been rearranged. Other matters have reared their ugly heads and I won't be able to test this for several weeks.
So thank you for your response. Although we haven't resolved this problem, I now have a way to test the actual content. So, as far as I'm concerned, you've earned the points.
Once this has been resolved (I'll take a hammer to it if I have to), I'll post the results here.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 1500 total points
ID: 18100163
Yes, please do
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question