GB_001 Posted August 13, 2009 Share Posted August 13, 2009 Hello, I've tested my drag script on most browsers but on the Iphone browser it does not work. var ie = document.all; var nn6 = document.getElementById &&! document.all; var isdrag = false; var x, y; var dobj; function movemouse( e ) { if( isdrag ) { dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y; return false; } } function selectmouse( e ) { var fobj = nn6 ? e.target : event.srcElement; var topelement = nn6 ? "HTML" : "BODY"; while (fobj.tagName != topelement && fobj.className != "dragme") { fobj = nn6 ? fobj.parentNode : fobj.parentElement; } if (fobj.className=="dragme") { if(isdrag==true) { isdrag = false; }else{ isdrag = true; dobj = document.getElementById(VV); tx = parseInt(dobj.style.left+0); ty = parseInt(dobj.style.top+0); x = nn6 ? e.clientX : event.clientX y = nn6 ? e.clientY : event.clientY; document.onmousemove=movemouse; return false; } } } Thanks, GB. Quote Link to comment Share on other sites More sharing options...
corbin Posted August 13, 2009 Share Posted August 13, 2009 Have you ever seen a drag script work on the iPhone? I have no idea if it will even work.... Quote Link to comment Share on other sites More sharing options...
GB_001 Posted August 13, 2009 Author Share Posted August 13, 2009 Have you ever seen a drag script work on the iPhone? I have no idea if it will even work.... I heard there was a special way of doing it. But google sadly isn't helping. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.