Solved

Keeping control characters in inputbox

Posted on 2006-11-27
5
190 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
  • 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 500 total points
ID: 18100163
Yes, please do
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to dynamically set the form action using jQuery.

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now