Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

popup information box help please

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-18-2007, 12:47 PM
  a1deano's Avatar 
a1deano a1deano is offline
 

X-Adept
  
Join Date: Oct 2004
Posts: 745
 

Default 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
__________________
--------------
V4.6.1
xcartmods - Reboot Template

X-cart - X-PDF

Altered Cart - Checkout one
Reply With Quote
  #2  
Old 09-21-2007, 01:57 AM
  a1deano's Avatar 
a1deano a1deano is offline
 

X-Adept
  
Join Date: Oct 2004
Posts: 745
 

Default Re: popup information box help please

could any possible advise on this one please.

Thanks for your time
__________________
--------------
V4.6.1
xcartmods - Reboot Template

X-cart - X-PDF

Altered Cart - Checkout one
Reply With Quote
  #3  
Old 10-30-2007, 07:39 AM
  a1deano's Avatar 
a1deano a1deano is offline
 

X-Adept
  
Join Date: Oct 2004
Posts: 745
 

Default 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
__________________
--------------
V4.6.1
xcartmods - Reboot Template

X-cart - X-PDF

Altered Cart - Checkout one
Reply With Quote
  #4  
Old 10-30-2007, 09:27 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default 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}
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #5  
Old 11-01-2007, 07:13 AM
  a1deano's Avatar 
a1deano a1deano is offline
 

X-Adept
  
Join Date: Oct 2004
Posts: 745
 

Default 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
__________________
--------------
V4.6.1
xcartmods - Reboot Template

X-cart - X-PDF

Altered Cart - Checkout one
Reply With Quote
  #6  
Old 11-16-2007, 03:31 AM
  a1deano's Avatar 
a1deano a1deano is offline
 

X-Adept
  
Join Date: Oct 2004
Posts: 745
 

Default 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
__________________
--------------
V4.6.1
xcartmods - Reboot Template

X-cart - X-PDF

Altered Cart - Checkout one
Reply With Quote
  #7  
Old 01-21-2008, 01:19 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

Senior Member
  
Join Date: Nov 2007
Location: Australia
Posts: 118
 

Default 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!
__________________
Pedro
digitalnotions.i2u.shop
shop.modestclassy.com.au4.1.9 X-Cart
X-Cart
Business 5.3.6.0
Multi-vendor 5.3.6.0


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:56 PM.

   

 
X-Cart forums © 2001-2020