Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up keyboard

Status
Not open for further replies.

shawkz

Programmer
Joined
Oct 25, 2005
Messages
84
Location
GB
hi, i want to have a pop up keypad or keyboard which i can press the keys and it will populate a textfield on the page. Is it possible to have the keyboard as a seperate page which i can add as an include page? Anyone know the best way to do this?

kindest regards.
 
Anyone know the best way to do this?

Maybe it's just me, but I'd start by looking on google.

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
If you are going to do this, it will require Javascript. Before you even begin code - is this actually an option for the type of solution you are developing? If it is for small screen hand-helds then you will need to confirm the support of Javascript.

And check with Google... of course [smile]

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
hi, i have mapped a keyboard out on my htm page and want to populate a text field on an onclick event.. an example button..

<input type="button" name="1" style="Width: 40px; Height: 40px;" class="buttontext" value="1" onClick="Select1()">

this works fine but i dont want to repeat the code below for each letter & number in the alphabet.
can anyone show me how to put it in a loop? Need to pass the letter number to the function and retuen it to the textfiled? there is also a clear button, back space, etc...

function Select1() {
if (form1.hiddenPointer.value == 0) {
if (form1.textfield_Start.value.length > -1)
string = document.form1.textfield_Start.value + "1";
else
string = document.form1.textfield_Start.value
document.form1.textfield_Start.value = string;
}
else {
if (form1.textfield_End.value.length > -1)
string = document.form1.textfield_End.value + "1";
else
string = document.form1.textfield_End.value
document.form1.textfield_End.value = string;
}
}

kindest regards...
 
Rename your function from "Select1" to "SelectChar". Then, change this:

Code:
onClick="Select1()"

to this:

Code:
onclick="SelectChar(this.value);"

this:

Code:
function Select1() {

to this:

Code:
function SelectChar(whichChar) {

and then all occurrences of "1" within the function to "whichChar" (but without the quotes).

That should get you started.

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top