• 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?
  • 3
  • 2
1 Solution
It means you have a CSS error...

I assume style.js sets up the CSS styling on some of your page elements?

They say that commenting out your css with:

       .styling { blah... }

Will cause this error...
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.
zzynxSoftware engineerAuthor Commented:
Your second comment... of course
Hiya zzynx :-)  Didn't spot it was you :-)

Glad it's solved now :-)

Good luck fella!


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