OK i have an error in IE7:
Line: 125
Char: 7
Error: "ClientY" is null or not an object
Now i have been reading about this error and i have tried to change PageY to ClientY still seems to come up. I noticed in a previous post someone had posted a modified file but the link was broken.
Im using the most recent IH2 install, installed and reinstalled numerous times and followed a few ways on here but still nothing.
I think it has only started happening today!
Can someone please check my js file?
Link: www.truwater.com.au
Thanks gee38lHTML Code:/* Simple Image Trail script- By JavaScriptKit.com Visit http://www.javascriptkit.com for this script and more This notice must stay intact Modified by Tim Kroeger ([email protected]) for use with image handler 2 and better cross browser functionality */ var offsetfrommouse=[10,10]; //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset var displayduration=0; //duration in seconds image should remain visible. 0 for always. var currentimageheight = 400; // maximum image size. var padding=10; // padding must by larger than specified div padding in stylessheet // Global variables for sizes of hoverimg // Defined in "showtrail()", used in "followmouse()" var zoomimg_w=0; var zoomimg_h=0; if (document.getElementById || document.all){ document.write('<div id="trailimageid">'); document.write('</div>'); } function getObj(name) { if (document.getElementById) { this.obj = document.getElementById(name); this.style = document.getElementById(name).style; } else if (document.all) { this.obj = document.all[name]; this.style = document.all[name].style; } else if (document.layers) { this.obj = document.layers[name]; this.style = document.layers[name]; } } function gettrail(){ return new getObj("trailimageid"); } function truebody(){ return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function showtrail(imagename,title,oriwidth,oriheight,zoomimgwidth,zoomimgheight, image, startx, starty, startw, starth){ zoomimg_w=zoomimgwidth; zoomimg_h=zoomimgheight; //if (oriwidth > 0){ offsetfrommouse[0] = oriwidth; } //if (oriheight > 0){ offsetfrommouse[1] = -1 *(zoomimgheight-oriheight)/2 - 40; } // alert (offsetfrommouse[0] + "," + offsetfrommouse[1]); if (zoomimgheight > 0){ currentimageheight = zoomimgheight; } trailobj = gettrail().obj; trailobj.style.width=(zoomimgwidth+(2*padding))+"px"; trailobj.style.height=(zoomimgheight+(2*padding))+"px"; trailobj.setAttribute("startx", startx); trailobj.setAttribute("starty", starty); trailobj.setAttribute("startw", startw); trailobj.setAttribute("starth", starth); trailobj.setAttribute("imagename", imagename); trailobj.setAttribute("imgtitle", title); document.onmousemove=followmouse; } function hidetrail(){ trailstyle = gettrail().style; trailstyle.visibility = "hidden"; document.onmousemove = ""; trailstyle.left = "-2000px"; trailstyle.top = "-2000px"; } function followmouse(e){ var xcoord=offsetfrommouse[0]; var ycoord=offsetfrommouse[1]; var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15; var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight); //if (document.all){ // trail.obj.innerHTML = 'A = ' + truebody().scrollHeight + '<br>B = ' + truebody().clientHeight; //} else { // trail.obj.innerHTML = 'C = ' + document.body.offsetHeight + '<br>D = ' + window.innerHeight; //} var relativeX = null; var relativeY = null; if (typeof e != "undefined"){ if ((typeof e.layerX != "undefined") && (typeof e.layerY != "undefined")) { relativeX = e.layerX; relativeY = e.layerY; } else if ((typeof e.x != "undefined") && (typeof e.y != "undefined")) { relativeX = e.x; relativeY = e.y; } if (docwidth - e.pageX < zoomimg_w + (3 * padding)) { xcoord = e.pageX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]); } else { xcoord += e.pageX; } if (docheight - e.pageY < zoomimg_h + (2 * padding)){ ycoord += e.pageY - Math.max(0,(0 + zoomimg_h + (5 * padding) + e.pageY - docheight - truebody().scrollTop)); } else { ycoord += e.pageY; } } else if (typeof window.event != "undefined"){ if ((typeof event.x != "undefined") && (typeof event.y != "undefined")) { relativeX = event.x; relativeY = event.y; } else if ((typeof event.offsetX != "undefined") && (event.offsetY != "undefined")) { relativeX = event.offsetX; relativeY = event.offsetY; } if (docwidth - event.clientX < zoomimg_w + (3 * padding)) { xcoord = event.clientX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]); } else { xcoord += truebody().scrollLeft+event.clientX; } if (docheight - event.clientY < zoomimg_h + (2 * padding)){ ycoord += event.clientY - Math.max(0,(0 + zoomimg_h + (5 * padding) + e.clientY - docheight - truebody().scrollTop)); } else { ycoord += truebody().scrollTop + event.clientY; } } trail = gettrail(); startx = trail.obj.getAttribute("startx"); starty = trail.obj.getAttribute("starty"); startw = trail.obj.getAttribute("startw"); starth = trail.obj.getAttribute("starth"); imagename = trail.obj.getAttribute("imagename"); title = trail.obj.getAttribute("imgtitle"); // calculate and set position BEFORE switching to visible var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15; var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight); if(ycoord < 0) { ycoord = ycoord*-1; } if ((trail.style.left == "-2000px") || (trail.style.left == "")) { trail.style.left=xcoord+"px"; } if ((trail.style.top == "-2000px") || (trail.style.top == "")) { trail.style.top=ycoord+"px"; } trail.style.left=xcoord+"px"; trail.style.top=ycoord+"px"; // alert (trail.style.left+","+trail.style.top); if (trail.style.visibility != "visible") { if (((relativeX == null) || (relativeY == null)) || ((relativeX >= startx) && (relativeX <= (startx + startw)) && (relativeY >= starty) && (relativeY <= (starty + starth)))){ newHTML = '<div><h1>' + title + '</h1>'; newHTML = newHTML + '<img src="' + imagename + '"></div>'; trail.obj.innerHTML = newHTML; trail.style.visibility="visible"; } } }
Last edited by gee38l; 10 Dec 2008 at 10:33 AM. Reason: added link
My problem has been discovered and I wanted to share it here, just in case, somewhere down the road, there is someone as dense as I
*I* thought I was supposed to put the 4 folders (admin, bmz_cache, images, and includes) INTO my zencart folder. I guess I didn't know what ROOT meant, and assumed it was "directly to". Anyway, apparently they are to go into the /public_html/. NOT the /public_html/zencart.
NOW, after finding that thread I posted above about the overwriting files (http://www.zen-cart.com/forum/showthread.php?t=83680) I'm scared to move them! LOL!
I want to be CLEAR of what I am to do now, before I do it. Especially since I am seeming to misunderstand things! In that thread Misty says:
This is my plan....tell me if it's right!YES..
YOU DO NOT REPLACE EXISTING ZENCART folders
ALWAYS BACKUP your zencart install and mysql database
BEFORE installing any zencart mod..
First I need to back up what I have. Is it correct that to do this, I just FTP a copy of my zencart folder to my desktop? And then, where do I go to make a copy of the mysql?
After that, I will go back to the place on my computer with the IH2 download, and put them into the /public_html? The bmz_cache direcly to it, and then OPEN the other three folders and move each file individually to the folder that is already in the public_html with that name?
Then, is it going to hurt anything to leave these other ones in the zencart folder that is in the public_html? Or do I remove them? Or do I remove just a PART of them? I DO think that those were overwritten. Ok, I KNOW something in there was overwritten.....I just don't know what to do about it now.....
Check out Tutorials/FAQ top of the page.
Not to confuse everyone on where to put files....
It depends on where you installed Zen-Cart.
In MamaT case she has ZenCart installed to /public_html/.
But she misunderstood when installing IH and created a new folder /public_html/zencart/ and uploaded the IH files there.
YES, always backup before adding/touching any files.
AND use the Folder OverRides.
M
Now I'm officially ready to cry! I don't get this at all! I made the backups, went back and FTP'd the admin, includes, and images folders to the folders with the corresponding names in public_html, FTP'd the bmz_cache directly to the public_html, and STILL nothing is showing up in my admin/tools. I even logged out of my admin page and opened it back up, hoping that it needed to "reset" or something.
WHAT am I missing? WHY is this so difficult for me?! AAARGH!!!
Mama T
I would say do this step by step - load the admin folder to the admin folder, etc - if nothing is appearing - you must have something in the wrong place.
Where does your zencart folder site? is it at the root of your space (within htdocs/publichtnl etc) or do you have a folder called shop/zen etc?
My zen sites normally site at the root of my space (i.e htdocs/ publichttp etc)
I then load everything up - apart from the includes folder. So I click admin, bmz_cache and click the arrow in ftp to copy them across
Then I open up the includes folder and copy the folders across one by one, ithen includes/templates I then open my own override folder (rather than the template_default or classc folder) and copy the contents of the (image handler) templates_default to my override folder.
Then I change the settings on the BMZ_CACHE folder , then all thats left to do is simply go to tools>image handler, then I click install.
thanks peanut. i'm in the process of doing it one by one now. my question is that in the modules/pages, there are header_php files in both the popup_image and the popup_image_additional. They are different in their file sizes so I'm now confused. I didn't want to overwrite what was already in the popup_image so I put it in my module override folder. Now I've come to the second one and if I put it in the popup_image_additional it would overwrite there, but if I put it in my module override file, it would overwrite the one I just put in there for popup_image.
Does that make ANY sense??
Bookmarks