Solved

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

Posted on 2006-06-12
5
3,961 Views
Last Modified: 2012-08-13
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
Comment
Question by:zzynx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 16884070
It means you have a CSS error...

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

Accepted Solution

by:
TimYates earned 250 total points
ID: 16884083
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
 
LVL 37

Author Comment

by:zzynx
ID: 16884407
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
 
LVL 37

Author Comment

by:zzynx
ID: 16884412
Your second comment... of course
0
 
LVL 35

Expert Comment

by:TimYates
ID: 16884420
Hiya zzynx :-)  Didn't spot it was you :-)

Glad it's solved now :-)

Good luck fella!

Tim
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question