Custom javascript not working in IE

kscotbarrkscotbarr Member
in Bugs & Feature Requests edited June 2011
Hey guys. Trying to finish up this upgrade to 0.7.1 but found that I'm having trouble in IE. I have some custom javascript in my cart and checkout templates that isn't working in IE. Just some simple statements to show/hide/manipulate some of the elements to get them looking like I want them to. Can't figure out why its working in other browsers:

http://www.goodsoil.com/resources/other-publishers/
Comments
  • fc_adamfc_adam FoxyCart Team
    edited June 2011
    Looking at the source for your cart and checkout templates, it looks like the IE conditional tags are playing havock with the page a bit. Essentially, all of the fc_json and some of the foxycart automatic included files are being wrapped in an if IE 6 conditional block.

    This is probably coming from the fact that the FoxyCart includes are inserted after the last style or title tag, so the last style tag is wrapped in an IE conditional. To fix that, either move your IE conditionals above your other script tag, but I'm guessing that would make your IE conditionals not overwrite your other styles like you want them to. So maybe try adding an empty style tag after your IE conditionals and see how that goes:
    <style type="text/css"></style>
    

    [edit] also, it looks like your missing the last part of the analytics include on the checkout, as that's throwing an error in Firefox.
  • kscotbarrkscotbarr Member
    edited June 2011
    That was it! Adding the empty style tag did the trick. Thanks!

    And thanks for the heads up on the Google Analytics tag. Didn't notice that.
  • lancelance Member, Community Support Member
    @kscotbarr -

    Glad you got this up and running. Post again if you encounter any other issues.

    Lance
Sign In or Register to comment.