Administrators Farshad Mohajeri Posted August 2, 2011 Administrators Posted August 2, 2011 Below meta displays page in a 1/1 scale and also disables browser in-zoom/out-zoom function. It should be added to servermodule.CutsomMeta. <meta content='True' name='HandheldFriendly' /> <meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' /> Below script disables moving the page around inside the browser window. Add this to MainForm.Script document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false);
dionel1969 Posted August 2, 2011 Posted August 2, 2011 Below meta displays page in a 1/1 scale and also disables browser in-zoom/out-zoom function. It should be added to servermodule.CutsomMeta. <meta content='True' name='HandheldFriendly' /> <meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' /> <meta name="viewport" content="width=device-width" /> Below script disables moving the page around inside the browser window. Add this to MainForm.Script document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false); Thank you. This is an important aspect of the current applications. It is a big increment of the use of mobile devices and the applications from they.
dionel1969 Posted August 2, 2011 Posted August 2, 2011 Two questions: 1- Why two times "viewport". Which is the difference between first and second???? 2- I test and application in IPhone 4 and the loading image of Safari WebBrowser is showing intermittent after page is loaded like is still doing something or calling something to server. Why????
Administrators Farshad Mohajeri Posted August 2, 2011 Author Administrators Posted August 2, 2011 Two questions: 1- Why two times "viewport". Which is the difference between first and second???? 2- I test and application in IPhone 4 and the loading image of Safari WebBrowser is showing intermittent after page is loaded like is still doing something or calling something to server. Why???? Second "viewport" seems to be unnecessary. It is OK to remove. BTW, it was Google knowledge. Original source here: http://garrows.com/?p=337
dionel1969 Posted August 2, 2011 Posted August 2, 2011 Two questions: 1- Why two times "viewport". Which is the difference between first and second???? 2- I test and application in IPhone 4 and the loading image of Safari WebBrowser is showing intermittent after page is loaded like is still doing something or calling something to server. Why???? I reply my self in second question: There was a UniTimer with the property Enable := True. That was the cause.
Administrators Farshad Mohajeri Posted August 2, 2011 Author Administrators Posted August 2, 2011 Below meta displays page in a 1/1 scale and also disables browser in-zoom/out-zoom function. It should be added to servermodule.CutsomMeta. <meta content='True' name='HandheldFriendly' /> <meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' /> Below script disables moving the page around inside the browser window. Add this to MainForm.Script document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false); Do not work under FireFox Android.
fjtrooper Posted August 10, 2011 Posted August 10, 2011 Hello, if you open this mobile prepared web in internet explorer 9 fails in the followed code: document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false); thanks
Administrators Farshad Mohajeri Posted August 10, 2011 Author Administrators Posted August 10, 2011 Solution: if (document.body) { document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false); }
Administrators Farshad Mohajeri Posted August 11, 2011 Author Administrators Posted August 11, 2011 What is the error code/message?
fjtrooper Posted August 11, 2011 Posted August 11, 2011 Oooopssss!! Sorry!! It works!!! I put the script in the incorrect form!! SORRY! Now works!!! ;-)
vojasoft Posted February 13, 2013 Posted February 13, 2013 Below meta displays page in a 1/1 scale and also disables browser in-zoom/out-zoom function. It should be added to servermodule.CutsomMeta. <meta content='True' name='HandheldFriendly' /> <meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' /> Below script disables moving the page around inside the browser window. Add this to MainForm.Script document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false); Hi! Code above does not work on Samsung Android browser. I appreciate any idea or help. Thanks in advance. Voja
Javier Bechir Posted May 27, 2013 Posted May 27, 2013 how to do a mobile application with unigui?. Is there any example?
Recommended Posts