Administrators Farshad Mohajeri Posted August 2, 2011 Administrators Share 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); Link to comment Share on other sites More sharing options...
dionel1969 Posted August 2, 2011 Share 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. Link to comment Share on other sites More sharing options...
dionel1969 Posted August 2, 2011 Share 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???? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 2, 2011 Author Administrators Share 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 Link to comment Share on other sites More sharing options...
dionel1969 Posted August 2, 2011 Share 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. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 2, 2011 Author Administrators Share 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. Link to comment Share on other sites More sharing options...
fjtrooper Posted August 10, 2011 Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 10, 2011 Author Administrators Share Posted August 10, 2011 Solution: if (document.body) { document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false); } Link to comment Share on other sites More sharing options...
fjtrooper Posted August 11, 2011 Share Posted August 11, 2011 Thanks!!!!! ;-) Link to comment Share on other sites More sharing options...
fjtrooper Posted August 11, 2011 Share Posted August 11, 2011 Same error ;-) Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 11, 2011 Author Administrators Share Posted August 11, 2011 What is the error code/message? Link to comment Share on other sites More sharing options...
fjtrooper Posted August 11, 2011 Share Posted August 11, 2011 Oooopssss!! Sorry!! It works!!! I put the script in the incorrect form!! SORRY! Now works!!! ;-) Link to comment Share on other sites More sharing options...
vojasoft Posted February 13, 2013 Share 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 Link to comment Share on other sites More sharing options...
Javier Bechir Posted May 27, 2013 Share Posted May 27, 2013 how to do a mobile application with unigui?. Is there any example? Link to comment Share on other sites More sharing options...
Recommended Posts