...

View Full Version : Problem with jscript showtrail



fraserr
08-31-2007, 04:00 AM
Having a problem with jscript function showtrail as implemented in jscript_imagehover.js for the Zencart shopping cart. I have attached a copy of the js file for reference.

The function call is

<img src="bmz_cache/0/027ee7d30684c42071bd4ba9693f2fb7.image.150x132.gif" alt="12x12 Baseball Album" title=" 12x12 Baseball Album " width="150" height="132" class="listingProductImage" style="position:relative" onmouseover="showtrail('bmz_cache/e/eced50a648f23835a9ae00b166b3522a.image.200x177.gif','12x12 Baseball Album',150,132,200,177,this,0,0,150,132);" onmouseout="hidetrail();" />

The problem is that when I hover over the image, the web page shifts down and the called image is inserted in white space at the top of the page.

Take a look at this page (http://www.cropinstop.com/index.php?main_page=index&cPath=1_33), the first image on the first row.

I am not a programmer, so all this code is Greek to me. Any help would be greatly associated. If you need more code, I will post it here.

Ross Fraser
webmaster cropinstop.com

Arty Effem
08-31-2007, 02:04 PM
Having a problem with jscript function showtrail as implemented in jscript_imagehover.js for the Zencart shopping cart. I have attached a copy of the js file for reference.
You have two separate <head> sections, so I think you need to validate (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cropinstop.com%2Findex.php%3Fmain_page%3Dindex%26cPath%3D1_33&charset=%28detect+automatically%29&doctype=Inline&group=0) your HTML first, as it's errors are probably confusing things.

fraserr
08-31-2007, 07:54 PM
Thank you for the feedback. The double <head> has been fixed (Thanks Microsoft:eek: ), but the problem persists. As for validating the code, unfortunately most of it is generated by PHP scripts in Zencart, and fiddling with that may open another can of worms.

Can anyone recommend a good Windows program for editing PHP that has some syntax checking? Frontpage and MS Expression insist on adding hidden bytes at the top of the file that causes the PHP execution to fail, and can only be removed with a hex editor.

Arty Effem
08-31-2007, 09:00 PM
Thank you for the feedback. The double <head> has been fixed (Thanks Microsoft:eek: ), but the problem persists.I've never seen the documentation for this code, but looking at the source I suspect that the code needs to be included in the body section, not the head.
Try moving the related <script> tags into the body section, at some point prior to any of the involved links/images.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum