Hi,
I have created 'mouse hover image enlarge' function on my website, using some free script from
www.javascript.com and a few mods to my CSS and HTML.
The key function in javascript is
HTML Code:
function showtrail(imagename,title,description,ratingaverage,ratingnumber,showthumb,height)
and my image HTML to kick this off is
HTML Code:
onmouseover="showtrail('../images/myimage.gif','Title','Description.','Other info.','Other Info.','1',203);"
onmouseout="hidetrail();"
The javascript works fine, but my problem is that my HTML is created using variables.
Images are called using
NETQUOTEVAR:SECTIONIMAGE
Titles are called using
NETQUOTEVAR:SECTIONTITLE
Descriptions are called using
NETQUOTEVAR:SECTIONTEXT
Enlarged image is callled using
CUSTOMVAR:HOVERIMAGE
so i modified my HTML to look like...
HTML Code:
onMouseOver="showtrail('CUSTOMVAR:HOVERIMAGE','NETQUOTEVAR:SECTIONNAME','NETQUOTEVAR:SECTIONTEXT','','','1',203;" onMouseOut="hidetrail();">
This should work as i use a program to flush through all of the variables and substitute them correctly, but for some reason it will not flush through the variables inside my function parenthesis.
Is there a reason for this ?????
Do I have to create a local set of variables to do local substitution?
Regards, Simon.
P.S. Here is an example of how my program flushes the variables.
If I create a template that looks like this:
HTML Code:
<!-- SectionNavImage_Hover HTML begin -->
<IMG SRC="NETQUOTEVAR:IMAGEFILE"
ALT="NETQUOTEVAR:ALTERNATETEXT"
BORDER=0
NETQUOTEVAR:IMAGEHEIGHT
NETQUOTEVAR:IMAGEWIDTH
NETQUOTEVAR:OTHERIMAGEMARKUP
ALIGN="ABSMIDDLE" title="" onMouseOver="showtrail('CUSTOMVAR:HOVERIMAGE','NETQUOTEVAR:SECTIONNAME','NETQUOTEVAR:SECTIONTEXT','','','1',203;" onMouseOut="hidetrail();">
<!-- SectionNavImage_Hover HTML end -->
My porgram will flush through the variables and deliver this :
HTML Code:
<!-- SectionNavImage_Hover HTML begin -->
<IMG SRC="../images/hazard/electrical/H010121.gif"
ALT="H010121"
BORDER=0
HEIGHT=111
WIDTH=80
ALIGN="ABSMIDDLE" title="" onMouseOver="showtrail('','NETQUOTEVAR:SECTIONNAME','NETQUOTEVAR:SECTIONTEXT','','','1',203);" onMouseOut="hidetrail();">
<!-- SectionNavImage_Hover HTML end -->
Substituting the variables with the relevant file and image details. however it does not flush the ones called in the
showtrail() funtion ??????