Solved

Keeping control characters in inputbox

Posted on 2006-11-27
5
189 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Yes, please do
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 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

6 Experts available now in Live!

Get 1:1 Help Now