X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Use Javascript and CSS to hid / flip visibilty of elements (https://forum.x-cart.com/showthread.php?t=13253)

Jerrad 12-13-2006 12:12 PM

Re: Use Javascript and CSS to hid / flip visibilty of elements
 
This used to work really great in Explorer, Firefox and Opera.
Unfortunately it doesn't in Internet Explorer 7.0, I just noticed.
Displaying the hidden content by clicking the radiobutton works fine, but clicking
the hide radiobutton doesn't hide the content anymore...

Anybody knows how to get this also working for Explorer 7.0?

Many thanks in advance!

B00MER 12-20-2006 10:14 PM

Re: Use Javascript and CSS to hid / flip visibilty of elements
 
Just wanted to note, in 4.0.x and later of X-Cart a function to flipDiv's is already implemented.

Take a peek at skin1/common.js and you'll find:

function visibleBox(id,skipOpenClose)

Example in X-Cart that uses it is the search.php page "Advanced Search" opens the entire search form.

Just setup your links for the open/close toggle with an id="closeX" and id="openX" the actual area that is hidden and appears would be id="boxX"

X for all id's being an incremental number starting at 1 to whatever.

Kudos!

sstillwell@aerostich.com 12-21-2006 05:30 AM

Re: Use Javascript and CSS to hid / flip visibilty of elements
 
Quote:

Originally Posted by Jerrad
This used to work really great in Explorer, Firefox and Opera.
Unfortunately it doesn't in Internet Explorer 7.0, I just noticed.
Displaying the hidden content by clicking the radiobutton works fine, but clicking
the hide radiobutton doesn't hide the content anymore...

Anybody knows how to get this also working for Explorer 7.0?

Many thanks in advance!


Yes, you are right. I just noticed this a few weeks ago and had to change the code to make it work. Right now, it's just a band aid and I'm not really sure why IE7 doesn't like the original. My opinion, IE7... still sucks.

sstillwell@aerostich.com 12-21-2006 05:32 AM

Re: Use Javascript and CSS to hid / flip visibilty of elements
 
Quote:

Originally Posted by B00MER
Just wanted to note, in 4.0.x and later of X-Cart a function to flipDiv's is already implemented.

Take a peek at skin1/common.js and you'll find:

function visibleBox(id,skipOpenClose)

Example in X-Cart that uses it is the search.php page "Advanced Search" opens the entire search form.

Just setup your links for the open/close toggle with an id="closeX" and id="openX" the actual area that is hidden and appears would be id="boxX"

X for all id's being an incremental number starting at 1 to whatever.

Kudos!


And that is why he is an Xcart Guru. Thanks B00MER.

zshiek 01-07-2007 04:24 PM

Re: Use Javascript and CSS to hid / flip visibilty of elements
 
wow that is a full waste of code right there.. Basically

onMouseover and onMouseCLick on the <a> and then call the appropriate css on off commands for the divs. simple.. no php no nothing.. just simple three lines of java, and css


All times are GMT -8. The time now is 11:37 AM.

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