Displays both javascript and non-JS widget in IE7

plator - December 2, 2007 - 10:25
Project:jRating
Version:5.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:hickory
Status:active
Description

Hello. I'm trying the most recent development version of this module on a Drupal 5.3 site with latest version 1.21 of jQuery. The theme as you will see if the garland one. All goes very well and works fine in Firefox and Opera but in IE7 both widgets are shown simultaneously. Please see attached screenshot.

The error that is alerted points to this code in th e source here. The same code will appear in Opera & Firefox but does not cause error and the module works very well.

<script type="text/javascript">$("head").append("<style type='text/css'/>").find("style:last").append("form.rating{display:none}");</script>
    <style type="text/css" media="print">@import "/themes/garland/print.css";</style>
    <!--[if lt IE 7]>
    <style type="text/css" media="all">@import "/themes/garland/fix-ie.css";</style>
    <![endif]-->

The site is not live right now so I can't give you a URL to check directly. On the info I can give you, is there anything obvious to you or anyone? Thank you ever so much.

AttachmentSize
IE7 jRating.jpg4.61 KB

#1

lemartialou - December 3, 2007 - 01:56

I had the same problem

In the jrating.css file, lines 51 to 55 are commented for some reason (not the case in the 1.0 version):

form.rating {
  display: none;
}

By uncommenting this part, the double display problem in IE was solved.
Don't know if this is the right thing to do but it works

hope it helps.

#2

plator - December 3, 2007 - 07:55

Thank you for spotting this and sharing this. I still see the JS error but as you have said it will correct the display problem in IE.

I think it is ok to leave this topic open for a while?

#3

hickory - December 3, 2007 - 09:45

I'll have a look at this (the way the form is hidden changed recently). You can use the "display:none" fix for now, but it'll mean the form doesn't show up for people with Javacript disabled.

#4

hickory - December 3, 2007 - 13:01
Category:support request» bug report
Assigned to:Anonymous» hickory

OK, I've checked in a different way of doing things that should work in IE and uses a workaround for Safari instead.

 
 

Drupal is a registered trademark of Dries Buytaert.