Par2: Using Javascript variables in Skeletons
2001-01-08 -- Michael Boston
<
Then in the script skeleton in the function onBodyLoad I added
this.form.mrbScreenWidth.value=screen.width;
this.form.mrbScreenHeight.value=screen.height;
Now each submit from the client includes the screen width in the variable
mrbScreenWidth and the height in the variable mrbScreenHeight.
You can adapt this to get the value of any JavaScript variable when an event
occurs and the value will be submitted with the next form from the client.
This would allow you to set the property that the is checking or add HTML code to the next page sent.
I also have added code which looks for certain CLARION variables and then
executes JavaScript if the application includes the variable in the html
sent to the client.
In the script .htm function onBodyLoad I added the statement:
if (this.form.ENTEREDPASSWORD){
this.form.ENTEREDPASSWORD.focus();
this.form.ENTEREDPASSWORD.select();
}
So if I include an Entry Variable named 'EnteredPassword' on my display the
name is uppered and sent to the client by the CLARION code and is selected
automatically by the Browser when the page is loaded.
Perhaps an adaptation of these techniques will give you some joy. :-)
Printed November 21, 2024, 7:02 am This article has been viewed/printed 35204 times.