Solved

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

Suggested Solutions

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

828 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