...

View Full Version : Button Event Not Reading in IE



simonstaton
12-11-2009, 09:56 AM
Hi,

ive just been debugging my script in IE, and came across this:


OrbitTool.prototype.handleMouseUp = function(e) {
if (e.button == g_o3d.Event.BUTTON_LEFT) {
this.mouseLeftDown = false;
} else if (e.button == g_o3d.Event.BUTTON_MIDDLE) {
this.mouseMiddleDown = false;
}
};

its giving me an error on the second line, the error reads ('button' is null or not an object). does anyone know why this might be? im not a pro with javascript so my knowledge only stretches so far.

Simon
Reply With Quote

gun5
12-11-2009, 10:05 AM
OrbitTool.prototype.handleMouseUp = function(e) {
e = e || event;


It's because the cross browser event object.

simonstaton
12-11-2009, 10:15 AM
sweet it stopped the error thanks

simonstaton
12-11-2009, 10:23 AM
hmm my system still isnt working in IE, do you know why this site will only work in firefox and not IE, you may need to download o3d's api to see it:

http://www.coding-development.co.uk/

Kor
12-11-2009, 11:07 AM
hmm my system still isnt working in IE
It would be of some help if you could tell us what isn't working in IE.

simonstaton
12-11-2009, 11:11 AM
Im not sure what is causing the problem I was wondering if anyone on here has a tool that could check the code, or if they could spot why it wasnt working.

simonstaton
12-11-2009, 12:35 PM
I think this might be where it is getting stuck, anyone see any IE issues in this code?



function dragOver(event) {
if (g_urlToInsert != null) {
doload(g_urlToInsert);
}
g_urlToInsert = null;
}

function startInsertDrag(url) {
// If no absolute web path was passed, assume it's a local file
// coming from the assets directory.
if (url.indexOf('http') != 0) {
var path = window.location.href;
var index = path.lastIndexOf('/');
g_urlToInsert = path.substring(0, index + 1) + g_assetPath + url;
} else {
g_urlToInsert = url;
}
}

function cancelInsertDrag() {
g_urlToInsert = null;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum