Fishbait
01-30-2001, 05:17 PM
Sample picture of application, for reference only. (http://freeweb.pdq.net/dstalker/graphics/main_sample.gif)
Hey, ok, I'll be as quick as possible to explain what I'm "trying" to do, and include all code I currently have.
I have 2 frame windows ('main_window', 'keyboard_window') for a Kiosk application. The 'keyboard_window' sends the letter that is pressed by the user to the 'frames_main' page (frameset) which calls the function virtualTyper. This function then sends the corresponding letter to the first_name text box in the 'main_window'.
By default the application loads up and the text box that has the focus is first_name. When a user presses the Q button in 'keyboard_window' it sends the letter Q to the first_name box in 'main_window'. Got it? Good!
What I've been trying to do is use a hidden object (input type=hidden) whose value should change depending upon which text box currently has the focus in the form. Lets say the first page has 10 boxes in the form. First name, Last name, Address, etc. Then I would like my function virtualTyper to look at the value of the hidden object and type the letters that are pressed in the appropriate text box. Currently the virtualTyper function is hard coded to the first_name box, and I have been having trouble getting it to type in any other boxes. Any assistance would be greatly appreciated!!!
If my method of thinking is not moving in the right direction, please advise. Thank you!!
'frames_main' (frameset page)
-----------------------------
<script language="JavaScript">
function virtualTyper(abcdef)
{
top.frames['main_window'].document.client_one.first_name.value+=abcdef
}
</SCRIPT>
'main_window' (where form is located)
-------------------------------------
<input type="hidden" name="has_focus" value="">
<input type="text" name="first_name" size="30" onFocus="client_one.has_focus.value='first_name'">
<cfinput type="text" name="occupation" size="20" onFocus="client_one.has_focus.value='occupation'">
'keyboard_window' (virtual kiosk keyboard)
------------------------------------------
<input type="image" onClick="parent.virtualTyper('Q');" src="graphics/keyboard_button_Q.gif">
Hey, ok, I'll be as quick as possible to explain what I'm "trying" to do, and include all code I currently have.
I have 2 frame windows ('main_window', 'keyboard_window') for a Kiosk application. The 'keyboard_window' sends the letter that is pressed by the user to the 'frames_main' page (frameset) which calls the function virtualTyper. This function then sends the corresponding letter to the first_name text box in the 'main_window'.
By default the application loads up and the text box that has the focus is first_name. When a user presses the Q button in 'keyboard_window' it sends the letter Q to the first_name box in 'main_window'. Got it? Good!
What I've been trying to do is use a hidden object (input type=hidden) whose value should change depending upon which text box currently has the focus in the form. Lets say the first page has 10 boxes in the form. First name, Last name, Address, etc. Then I would like my function virtualTyper to look at the value of the hidden object and type the letters that are pressed in the appropriate text box. Currently the virtualTyper function is hard coded to the first_name box, and I have been having trouble getting it to type in any other boxes. Any assistance would be greatly appreciated!!!
If my method of thinking is not moving in the right direction, please advise. Thank you!!
'frames_main' (frameset page)
-----------------------------
<script language="JavaScript">
function virtualTyper(abcdef)
{
top.frames['main_window'].document.client_one.first_name.value+=abcdef
}
</SCRIPT>
'main_window' (where form is located)
-------------------------------------
<input type="hidden" name="has_focus" value="">
<input type="text" name="first_name" size="30" onFocus="client_one.has_focus.value='first_name'">
<cfinput type="text" name="occupation" size="20" onFocus="client_one.has_focus.value='occupation'">
'keyboard_window' (virtual kiosk keyboard)
------------------------------------------
<input type="image" onClick="parent.virtualTyper('Q');" src="graphics/keyboard_button_Q.gif">


