custom touch functions

Hi Clifton,
I am doing my best to make my program compatible with touchscreen devices. It's not simple but things are slowly getting better. I have opted for a non-Toolbook login page containing a form as this seemed to be the only sure way of getting the browser to react immediately by asking to save the username and password which is what I want. A TB Powerpac password field was more hit and miss in my experience but I may have been doing something wrong. Conversely, although there are other (TB Powerpac) password fields in the program I don't want these to trigger the save password routine because in a school one computer will often be used by more than one student or teacher. Of course just to be ornery they sometimes do but not when you'd expect them to. Sometimes a long time after their use. Movement from one iframe to another seems to be the trigger. Anyway I have solved the problem by making my own password field system which works well and looks exactly like the real thing. I have included an 'eye feature' that allows the user to see the password which looks just like toggling between password/text with Powerpac. The login is here https://www.mediacours.com/login/ I had to use a form input button. I tried an image at first but that kept asking if the image should be downloaded. The button works better. It works on a desktop computer but equally well on a tablet with this code:
//Surprisingly it seems that touchstart, touchend,mousedown and mouseup can coexist.
//At least they can on an Android tablet. What about an I-pad I wonder?
document.getElementById('eye').addEventListener("touchstart", function(event){
showTxt();
}, true);
document.getElementById('eye').addEventListener("touchend", function(event){
showPwd();
}, true);
document.getElementById('eye').addEventListener("mousedown", function(event){
showTxt();
}, true);
document.getElementById('eye').addEventListener("mouseup", function(event){
showPwd();
}, true);
I'm wondering if it is possible to incorporate this into ceratin other parts of the program where password fields are used. What do you think? If it's too complicated, don't bother. I already have a workaround that uses a click which is recognised by the touchscreen but this means two clicks instaed of mousedown/mouseup touchstart/touchend. If you want to see the login in action try username AR-1 password K2rPc8lf. Later on I'll give a better guided tour in English if you have time but as yet I still need to finish a number of things.
John
I am doing my best to make my program compatible with touchscreen devices. It's not simple but things are slowly getting better. I have opted for a non-Toolbook login page containing a form as this seemed to be the only sure way of getting the browser to react immediately by asking to save the username and password which is what I want. A TB Powerpac password field was more hit and miss in my experience but I may have been doing something wrong. Conversely, although there are other (TB Powerpac) password fields in the program I don't want these to trigger the save password routine because in a school one computer will often be used by more than one student or teacher. Of course just to be ornery they sometimes do but not when you'd expect them to. Sometimes a long time after their use. Movement from one iframe to another seems to be the trigger. Anyway I have solved the problem by making my own password field system which works well and looks exactly like the real thing. I have included an 'eye feature' that allows the user to see the password which looks just like toggling between password/text with Powerpac. The login is here https://www.mediacours.com/login/ I had to use a form input button. I tried an image at first but that kept asking if the image should be downloaded. The button works better. It works on a desktop computer but equally well on a tablet with this code:
//Surprisingly it seems that touchstart, touchend,mousedown and mouseup can coexist.
//At least they can on an Android tablet. What about an I-pad I wonder?
document.getElementById('eye').addEventListener("touchstart", function(event){
showTxt();
}, true);
document.getElementById('eye').addEventListener("touchend", function(event){
showPwd();
}, true);
document.getElementById('eye').addEventListener("mousedown", function(event){
showTxt();
}, true);
document.getElementById('eye').addEventListener("mouseup", function(event){
showPwd();
}, true);
I'm wondering if it is possible to incorporate this into ceratin other parts of the program where password fields are used. What do you think? If it's too complicated, don't bother. I already have a workaround that uses a click which is recognised by the touchscreen but this means two clicks instaed of mousedown/mouseup touchstart/touchend. If you want to see the login in action try username AR-1 password K2rPc8lf. Later on I'll give a better guided tour in English if you have time but as yet I still need to finish a number of things.
John