showing the keyboard on page load / document ready
|
|
Is there any way of showing the keyboard on page load / document ready? I've been spending some time trying but with no success! is there a way of doing it? Thanks |
|
|
Hi Luís, This depends on whether you are using the userscript version or the static version. Making the userscript version appear on page load doesn't make a lot of sense, so you are probably using the static version, correct? You can do this by executing the onclick() method of the little keyboard icon that the script places next to each activated input field. You'll need to add another onload event listener to the window which comes after the keyboard.js script in source code order. window.onload = function() {
// nextSibling means the element after the input
document.getElementById('myInput').nextSibling.onclick();
}
Where myInput is the id of the input element for which you want the keyboard to appear right away. Doing the same for the userscript version is similar but you would have to build a dblclick event and trigger it on the input, since it uses (more complicated) DOM event listeners. Hope that helps! |
|
|
Thanks for the kick reply Grey!
|
|
|
Thanks again Grey! It works perfect on FF.
seams to be undefined!
Trying to figure it out! but again no success! No debugger for that! :(
|
|
|
Ok, "IE" strikes back on me...(again and again) Got the keyboard working in IE, with a little workaround... putting the code at the end of My guess is something to do with css position attribute! :( I'm looking at css or Thanks |
|
|
Hi Luís,
IE should support the window.onload = function() {
setTimeout(function() {
document.getElementById('myInput').nextSibling.onclick();
}, 100);
}
This will delay the execution of the onclick call until 100ms after the page has loaded, giving the keyboard script plenty of time to work unimpeded (since it also starts onload). It will remove the possibility of the onclick() call happening before the keyboard image is applied to all inputs. |
|
|
Thanks again Grey! Yesterday night I got it working with my workaround... I had notice that IE need all the elements in the page to position correctly the keyboard.
For you info, I want to do a login page w/ password field, and your keyboard has a great funcionallity compared to others... and I allready adapted it to my needs! One last to do thing is to hide the the image. :) I will give it a try this weekend. Report to you after my tests. Have a great weekend! :) |
|
|
Hi Grey!
Many thanks again! |
|
|
Glad to hear it :) Cheers! |