X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   popup information box help please (https://forum.x-cart.com/showthread.php?t=34027)

a1deano 09-18-2007 12:47 PM

popup information box help please
 
Hi All

Iam trying to install a mouse over text popup information box, ive followed the instructions but get an error message so not sure if iam doing it right or if this code is compatible with xcart
Instructions are -

Place this code within the head
Quote:

<STYLE TYPE="text/css">
<!--
#dek {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE>

And place this code within the body -
Quote:

<DIV ID="dek"></DIV>

<SCRIPT TYPE="text/javascript">
<!--

//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit http://dynamicdrive.com

Xoffset=-60; // modify these values to ...
Yoffset= 20; // change the popup position.

var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;

function popup(msg,bak){
var content="<TABLE WIDTH=225 BORDER=3 BORDERCOLOR=#FF8C00 CELLPADDING=2 CELLSPACING=4 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=#000000 SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.c lose();skn.visibility="visible"}
if(ns6){document.getElementById("dek").innerHTML=c ontent;skn.display=''}
if(ie4){document.all("dek").innerHTML=content;skn. display=''}
}

function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollL eft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollT op;
skn.top=y+yyy;
}

function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}

//-->
</SCRIPT>

Then place this code anywere you want the popup information box -
Quote:

<a href="http://www.yoursite.com" ONMOUSEOVER="popup('Put information here you want to appear in the box.','#D9D9F3')"; ONMOUSEOUT="kill()"><font color="#FF8C00"><u><b>Size Chart</b></u></a>

i keep getting this error message -
Quote:

Error: Smarty error: [in customer/home.tpl line 10]: syntax error: unrecognized tag: POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200; (Smarty_Compiler.class.php, line 436) in /home/a1deano69/public_html/testcart/Smarty-2.6.12/Smarty.class.php on line 1095

not sure if this code needs modifying to work with xcart v4.1.8 and were i should put the information as ive tested it using coffeecup and it works fine, also test in browsers IE and firefox it works fine, just can't get it to work in xcart.

Any help would be greatfully appreciated, regards Dean

a1deano 09-21-2007 01:57 AM

Re: popup information box help please
 
could any possible advise on this one please.

Thanks for your time

a1deano 10-30-2007 07:39 AM

Re: popup information box help please
 
Does anyone know of any other coding that will do this and work in v4.1.8

Thanks Dean

photo 10-30-2007 09:27 AM

Re: popup information box help please
 
Have you tried using literal tags?

{literal)
<SCRIPT TYPE="text/javascript">
<!--

//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit http://dynamicdrive.com

Xoffset=-60; // modify these values to ...
Yoffset= 20; // change the popup position.

var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;

function popup(msg,bak){
var content="<TABLE WIDTH=225 BORDER=3 BORDERCOLOR=#FF8C00 CELLPADDING=2 CELLSPACING=4 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=#000000 SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.c lose();skn.visibility="visible"}
if(ns6){document.getElementById("dek").innerHTML=c ontent;skn.display=''}
if(ie4){document.all("dek").innerHTML=content;skn. display=''}
}

function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollL eft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollT op;
skn.top=y+yyy;
}

function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}

//-->
</SCRIPT>
{/literal}

a1deano 11-01-2007 07:13 AM

Re: popup information box help please
 
Hi photo

Many thanks for your help i will give this a try and see what happens.

Many thanks Dean

a1deano 11-16-2007 03:31 AM

Re: popup information box help please
 
Hi Photo

Thanks for your help on this, unfortunatly it didn't work but ive been back to http://dynamicdrive.com and founf another one that has worked.

Thanks again

sales@webosusa.com 01-21-2008 01:19 PM

Re: popup information box help please
 
Quote:

Originally Posted by a1deano
Hi Photo

Thanks for your help on this, unfortunatly it didn't work but ive been back to http://dynamicdrive.com and founf another one that has worked.

Thanks again


Which one did you use to work? Thanks!


All times are GMT -8. The time now is 12:20 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.