Has anyone seen a code out there for an on screen keyboard for my website. Specifically a numerical keypad that can insert the value directly into a textfiled. I am working on a pod system and this would be perfect for the touch screen terminal. Any help?
Just make a small table with each being a small button and a Javascript to enter the data into the field that has focus. Shouldn’t be very hard to do… Good luck…
Could you point me to website or a sample script? I can think how I would do this if it were one number, but I am not sure how to do it if two numbers are entered
Okay, here is a Javascript one that is a pop-up type keyboard. Kinda cute, you might like it.
It basically pops up and you type then close it. Not sure if that is what you are looking for.
If not, I found this on google using “PHP on screen keyboard” and there were a lot of others.
(Expert’s note: when googling for PHP, start the search with “PHP”… Always works better!)
Good luck…
did you forget the example?
what page in search results did you find it on? I googled that and all it shows is software downloads for keypads, nothing for php or javascript.
SORRY, SORRY… My mouse messed up and I had to leave to help my sick mother… CRAZY hour or two…
Anyways, here is that link… SORRY again…
what would be the code to do this using jquery.
Hm… I should think as a rough draft, it would be a get method (or post) that would send the key pressed and the keys before that were pressed.
P.S. I didn’t know your mother was sick, ErnieAlex; I wish her well.
but I want it to add as I type them. this is for an ONLINE POS and needs to be optimized for a touchscreen.
Well that one is a basic, but, can be changed. So, it could be placed on a page or made full screen or whatever you need. You could use CSS to make it larger or whatever… It was just a starting spot.
Tomorrow I am helping sever people on this site catching up with notes. I can help more then.
Thanks on my mother, she is just getting over pneumonia and is finally doing better. More on the keyboard when I get back very late tonight or tomorrow…
so I did find a code. I would like this to workd here:
[php]
<input name="submit1" type="submit" value="Save Payment" />
- 7&
- 8*
- 9(
- 20
- 4$
- 5%
- 6^
- 10
- 1!
- 2@
- 3#
- 1.50
- 0)
- .)
- delete
- 8*
- 9(
- 20
- 4$
- 5%
- 6^
- 10
- 1!
- 2@
- 3#
- 1.50
- 0)
- .)
- delete
- 8*
- 9(
- 20
- 4$
- 5%
- 6^
- 10
- 1!
- 2@
- 3#
- 1.50
- 0)
- .)
- delete
- 8*
- 9(
- 20
- 4$
- 5%
- 6^
- 10
- 1!
- 2@
- 3#
- 1.50
- 0)
- .)
- delete
|
|
|
|
|
|
|
|
||
|
||||
|
|
|
|
|
|
|
|
||
|
||||
|
|
|
|
|
|
|
|
||
|
||||
|
|
|
|
|
|
|
|
||
|
||||
|
|
Did you get this figured out? I have been busy… I will look at it later if you still need help…
I do still need help with the last post I put.
No, I will look at it.
Also, just FYI… 99% of touch screens come with a driver that works like a mouse. So, any finger pressing on the screen is just like a mouse click at that point. So, most POS system just make a nice “pretty” keyboard show up when needed. Since, this keyboard is part of the page or program, it is just programmable like anything else you can click on. So, really no optimization needed for touch screens.
( I did one once for a Pizza Place, it was easy once the numbers got in place. )
So, first, do you already have this in place? Can I see how it is set up? If you do not want it out in the public yet, just send me the like by PrivateMessage. If it is not in place yet, let me know too. I am looking at the code right now.
it is not posted online yet. it is on a local testing server.
Searles03, I think you are over thinking it… I created a test HTML file for you. This only has 3 keys in it’s keyboard, a b c… And three fields. So, click on any field and it assumes the focus. Then, when you click keys they are entered into the field you selected. You can come up with some complicated way to select the fields, but, this works and very little code. Not much to it… I think it will work for you…
Okay, now to explain some further… First, you would have to include some code to error check and validate the type-in’s, but, you have to do this anyways. Also, if someone selects one input field, starts typing and then selects another without entering the first, the first should blank out. I did not put that code into my functions. That would be extremely simple to add, just check the last field for entries before allowing type in the next. Anyway, I am sure this will make your life much much easier… Just took a couple hours of thinking and laying out the code. Hope it helps…
This page works AS-IS, nothing else, so just drop it into a file and open it in your browser…
Have fun…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Keyboard Test</title>
</head>
<script language="JavaScript" type="text/javascript">
var textfocus="test1";
function fieldfocus(newfield){
textfocus=newfield;
}
function keypressed(keychar){
document.getElementById(textfocus).value = document.getElementById(textfocus).value + keychar;
}
</script>
<body>
<table width="100%">
<tr><td><center>Texting area, a few fields...</center></td></tr>
<tr><td><center>
<input type="text" ID="test1" name="test1" onfocus="fieldfocus(this.id);" />
<input type="text" ID="test2" name="test2" onfocus="fieldfocus(this.id);" />
<input type="text" ID="test3" name="test3" onfocus="fieldfocus(this.id);" /></center></td></tr>
<tr><td height="29"><table align="center">
<tr><td><input type="button" id="a" value="a" onclick="keypressed(this.value);" />
<input type="button" id="b" value="b" onclick="keypressed(this.value);" />
<input type="button" id="c" value="c" onclick="keypressed(this.value);" /></td><tr>
</table></td></tr>
</table>
</body>
</html>
LOL, just realized while going over it, that it is basically just TWO LINES! And, a few onclicks and onfocus’s… LOL, isn’t programming fun!
one thing, how do i Make a delete button? just deletes one letter at a time.
Well, a string is a string… Just use substr with a length of the textfield -1…
The code I gave you is basically string code. It pulls the string from the field and then adds your char pressed to the end of it. So, you would have to use, let’s say the backspace key and get the text from the current textfield. Then, save it back to the current field with substr and a length minus 1. That would “in effect” backspace one char.
In this manner, you can create an entire keyboard. You could put it into pop up or just on-screen. You would have to add a flag for the SHIFT key. Press a SHIFT once and it is on and press it again to turn it off. Should be easy, just will need some logic laying it all out… Good luck…
haha. right as the message came through, I figured it out. haha