Solved

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

Posted on 2006-06-12
5
3,767 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Popup to change image and store url in database 2 31
Reference Error with plugin 1 31
Angular- another way of coding hide and display 3 40
Why does my button disappear? 3 28
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'…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now