Community Forums 

Main Content

same cart script looks different in IE and Firefox

    Sep 20 2010 11:43:23



    Join date : 2008-09-18      Posts : 137

    I have been totally revamping my site and it is still in the building porcess and I have a script that adds up the price of a pc and displays a running total.

    Everything works fine except if you view the page in IE then View it in Firefox the script has a different length to it.

    Here is a link to the test site HERE

    Just follow the link to systems found under the computer menu link and you will see what I mean.

    Is this something that just happens between the two browsers or is it something I have wrong in my code.


    Sep 20 2010 12:48:24


    Sep 21 2010 07:00:58



    Join date : 2008-09-18      Posts : 137

    Thanks GT.

    I have emailed the designer of the web software I use to advise it has issues with it. This software I have no controll over it you just add text and images etc to it and it generates everything.

    As for the errors on the cart display I have also emailed the guy who wrote that as well requesting a fix for it.

    i knew the return to cart is wrong becase this is only a test site and the links are not relevant to anything yet.

    Now onto the real issue if you just extract the script and place on a page with no other content it still does the same.

    i have even visited your site and looked at your running total script and it also has the same issues under IE and FIrefox. It appears the less content you have it is not as noticable but when you have lots like I have the result is very dramatic. It's not a bigt issue but one of those little things that bug me.

    I have actually emailed some people at to see if they can shed some light on it why it happens so fingers crossed someone will have an answer soon.


    Sep 21 2010 18:56:50


    Gil Sery

    Join date : 2010-04-27      Posts : 141

    Hard as it may be to believe, (I still have trouble believing it, even though I now know it to be true), the problem stems from your incomplete DOCTYPE declaration.

    I had the same problem recently with my website, and noticed the same thing -- the script looks different in IE and FF. Someone on this board graciously pointed out to me that I did not have the URL in my DOCTYPE declaration. I figured I didn't need it, but when I added the URL to the DOCTYPE, presto change-o! The result seemed magical -- the script looked the same in both browsers!

    I'm pretty sure it's not something I would have thought of on my own, so I went to check your site, and sure enough, you are missing the URL from your DOCTYPE.

    FYI, the FULL DOCTYPE should read:

    [!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "";]

    Just replace the square brackets above with the regular HTML coding brackets (i.e. < and >) You only have the first line in your source code.

    Correct the DOCTYPE declaration and let us know if this fixes the problem.


    Sep 22 2010 08:11:00



    Join date : 2008-09-18      Posts : 137

    Hi Gil,

    I tried that and it totally destroyed the page. text was all over the place and the script bunched up to about 1 inch high so i remeved it all.

    I will keep trying to find my solution as it is bugging me

    Sep 22 2010 16:52:55


    Gil Sery

    Join date : 2010-04-27      Posts : 141

    pcguy said Hi Gil,

    I tried that and it totally destroyed the page. text was all over the place and the script bunched up to about 1 inch high so i remeved it all.

    I will keep trying to find my solution as it is bugging me

    I can see why. There are several code errors in the source code that need to be fixed. That's why I hand code my HTML -- yes, still. Even in this day and age of HTML generators, because you end up with code problems like this, that shouldn't be there in the first place, and wouldn't if the software companies that came up with these programs would just write valid HTML code for their programs!!!

    Sorry, got off on a bit of a tangent there. ;-)

    I strongly suggest that you validate the page and see what's up. For example, I tried to validate your page and noticed that you're missing the type="text/javascript" part just after your <SCRIPT> opening tag. Any time you use javascript, you need to put "<SCRIPT type="text/javascript"> so that the browser knows how to interpret it.

    If you find the W3C validator a little confusing (as I do), you can use this validator, that's a little more simple to understand:

    Also, you do know <font> is a deprecated (aka obsolete) tag, right? The correct way is to now use CSS to state <p style="color: black">

    Another error I noticed is that you have an image that is misnamed. I believe your file is called "man_ tick.png". However, spaces are not allowed in filenames used for websites. I suggest you either rename it "man_%20tick.png" or just remove the space altogether.

    I'm sorry to say that these kinds of things are what you get for using a HTML generator program, like Antenna 3. They're never as smart -- or as adaptable -- as the human brain. :-)