• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4169
  • Last Modified:

Error: Selector expected. Ruleset ignored due to bad selector.

Hi experts,

I have a jsp file containing these lines of code:

<script language="javascript" src="../sniffer.js"></script>
<script language="javascript1.2" src="../custom.js"></script>
<script language="javascript1.2" src="../style.js"></script>      // <<<< errors on this line

The javascript-console of FireFox gives me these errors:

"Selector expected. Ruleset ignored due to bad selector."
followed by
"Unexpected end of file while searching for closing } of invalid rule set."

Any ideas on what that means and how to solve it?
0
zzynx
Asked:
zzynx
  • 3
  • 2
1 Solution
 
TimYatesCommented:
It means you have a CSS error...

I assume style.js sets up the CSS styling on some of your page elements?
0
 
TimYatesCommented:
http://www.thescripts.com/forum/threadnav448649-2-10.html

They say that commenting out your css with:

    <style>
    <!--
       .styling { blah... }
    //-->
    </style>

Will cause this error...
0
 
zzynxSoftware engineerAuthor Commented:
Hi Tim,

You're second comment is exactly what I have.
Removing the comment indeed makes the FF errors disappear.

But since that error doesn't hinder anything else to work as defined in the css
I think I'll simply let it as it is.

But at least now I know!

Thank you very much.

PS. I increased the points because I feel you deserve it.
0
 
zzynxSoftware engineerAuthor Commented:
Your second comment... of course
0
 
TimYatesCommented:
Hiya zzynx :-)  Didn't spot it was you :-)

Glad it's solved now :-)

Good luck fella!

Tim
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now