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

What is the point of.......?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-12-2003, 07:49 AM
 
parmar parmar is offline
 

eXpert
  
Join Date: Apr 2003
Location: London, UK
Posts: 286
 

Default What is the point of.......?

What is the point of script below within the /rectangle_bottom.tpl

Code:
<SCRIPT> if (navigator.appName.indexOf('Microsoft')>=0) document.write("<TR><TD height='100%'><img src={$ImagesDir}/spacer.gif width=1 height=1></TD></TR>" ); else document.write("<TR><TD><img src={$ImagesDir}/spacer.gif width=1 height=1></TD></TR>" ); </SCRIPT>
Reply With Quote
  #2  
Old 07-12-2003, 02:29 PM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default Re: What is the point of.......?

Quote:
Originally Posted by parmar
What is the point of script below within the /rectangle_bottom.tpl

Code:
<SCRIPT> if (navigator.appName.indexOf('Microsoft')>=0) document.write("<TR><TD height='100%'><img src={$ImagesDir}/spacer.gif width=1 height=1></TD></TR>" ); else document.write("<TR><TD><img src={$ImagesDir}/spacer.gif width=1 height=1></TD></TR>" ); </SCRIPT>

I was wondering the exact same thing, it looks like redundant code left in there. I deleted it, it does nothing other than get in the way of your layout.
Reply With Quote
  #3  
Old 07-13-2003, 10:36 PM
 
webjoseph webjoseph is offline
 

Advanced Member
  
Join Date: Jun 2003
Posts: 33
 

Default actually its not redundant

This code was probably written to be cross-browser compatible. Netscape 4.0 doesn't recognize the TD tag setting where height=100%. It might just be for cosmetic looks where the cell expands all the way to the bottom to match the sides (in case your side panels extend really long), and the reason it's set to show when you have Explorer is because Explorer obeys this attribute.

The reason for the spacer.gif in both is because you want that there (or a non-breaking space if the height is needed to be greater than 1 px) so that the cell doesn't collapse. With Netscape browsers (and just for good coding practices), you should never have an empty cell.
Reply With Quote
  #4  
Old 07-16-2003, 04:30 AM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

Good thing netscape 4 is virtually extinct these day I've not had a netscrape 4 hit on my sites in ages. Even netscrape 6-7 only makes up 4% of hits on a site with 1.5 million visitors per year.
__________________
Groovico

Used by X-carters the world over:
Marketing Manager Pro Bundle For X-cart
Featured Product Manager for X-cart
Feed manager pro for X-cart

http://www.firetanksoftware.com

Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:43 PM.

   

 
X-Cart forums © 2001-2020