Zen Cart Logo
Forums / General Questions / This might be too much to ask. Mouse Trail Positioning in Image Handler Java

This might be too much to ask. Mouse Trail Positioning in Image Handler Java

Locked

Views: 835

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
13 Jun 2008, 7:55 PM
#1
greenongreen avatar

greenongreen

New Zenner

Join Date:
Oct 2006
Posts:
10
Plugin Contributions:
0

This might be too much to ask. Mouse Trail Positioning in Image Handler Java

I am working on a zencart here: http://www.catherineweitzman.com/zen-store/index.php?main_page=index&cPath=71

I have a rollover function that creates, essentially, a mouse trail with static screen xy pixel coordinates that displays an image handler image. My question... is there any way to make the static coordinates (currently 543 an 250 at bottom of code) also incorporate a "margin: auto;" function I would like to apply to the whole site. I am trying to center the zencart pages, but this mouse trail code is stuck in one place and will not center with the rest of the site.

This is probably not the place to ask such an esoteric question, but maybe someone has had a similar experience.
Thanks,
Jesse

// 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";

trail.style.left=543;
  trail.style.top=250;