Click to See Complete Forum and Search --> : focus feature form window's "On-screen-keyboard"
mr foo
12-06-2002, 03:29 AM
hi, there is a program that comes with most windows i know it comes with ME and XP, it is called "on-screen kyboard" and can be foud in the start menu>Programs>accesibility... the feature that i want from it is the focus thing of how you click on a text area eg. a conversation box on msn messanger and you can type or click the letter and it will come in the msn converstation, i need to know how to do this in javascript....
thanks :)
mr foo
12-06-2002, 07:04 AM
its easy to understand if you look at the prog, but you might not have it, oh well, this should make it easy to understand
there is a program which has all the leters of the keyboard on the screen...and what you do is click somewhere in a program first like in notepad, and then you click a letter with the mouse and that letter appears in notepad automatically you dont have to copy it or nothing that is what i want to do :)
thanks :)
mr foo
12-06-2002, 07:29 AM
thanks dave but im kindanot the greatest at javascript :(
i threw this together in dreamweaver
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<p>
<script language="JavaScript">
currentControl = null;
</script>
</p>
<form method="post" action="">
<input type="text" name="textfield">
<script language="JavaScript">
function setCurrentControl(fld) {
currentControl = fld;
return true;
}
</script>
</form>
<p>
<script language="JavaScript">
if (currentControl == null) {
alert("No form field has been selected.");
} else {
currentControl.value += keyStroke;
}
</script>
</p>
</body>
</html>
and umm yeah :S, is that right...um what i want this for is a showcwave text-field i have, and i would just type in to that then that would type straight into the other app :)
thanks again :)
mr foo
12-06-2002, 08:00 PM
ahhhh :( i still cant get it to work :( would you PLEASE be able to just throw together a sample in dreamweaver or frontpage?? it should only take seconds for someone with your knowledge :)
thanks
mr foo
12-06-2002, 10:28 PM
Originally posted by Dave Clark
No, I'll not do it all for you. I'll just pull together what I have already posted:
<html>
<head>
<title>Focus Control</title>
<script>
currentControl = null;
function setCurrentControl(fld) {
currentControl = fld;
return true;
}
function setKeystrokes(str) {
if (currentControl == null) {
alert('No form field has been selected.');
} else {
currentControl.value += str;
}
return true;
}
</script>
</head>
<body>
<form onSubmit="return false;">
<table>
<tr>
<td><input type="text"
onFocus="return setCurrentControl(this);"></td>
<td><input type="button" value=" A "
onClick="return setKeystrokes(this.value);"></td>
</tr>
<tr>
<td><input type="text"
onFocus="return setCurrentControl(this);"></td>
<td><input type="button" value=" B "
onClick="return setKeystrokes(this.value);"></td>
</tr>
<tr>
<td><input type="text"
onFocus="return setCurrentControl(this);"></td>
<td><input type="button" value=" C "
onClick="return setKeystrokes(this.value);"></td>
</tr>
</table>
<input type="button" value="Clear Field Focus"
onClick="currentControl = null; return true;">
</form>
</body>
</html>
Dave
:4 i think we had a miss understanding, i'll just ask this simply, is it possible to do this type of thing in the same general way but it can write straight ito an MSN messanger conversation box?? or a page that isnt acttually on that scripted window?