0
$(document).ready(
function(){
    $("#form1").validate(
    {
        rules:
        {
            email:
            { // compound rule
                required: true,
                email: true
            },
            password: "required",
            verify: {
                equalTo: "#password"
            }       
        }
    });
});

can someone pls tell me where on this script i have an error. IE8+IE7 says i have an error. it is driving me bananas:-)

9
  • 3
    I don't think there's a problem with the javascript. What does the rest of your code look like? Commented Dec 2, 2010 at 21:58
  • @Aaron Agreed.... Perhaps make a quick example using jsfiddle... Commented Dec 2, 2010 at 22:00
  • What error are you getting? When you click the error prompt in the status bar it should tell you something Commented Dec 2, 2010 at 22:01
  • I get "Expected identifier, string or number" error Commented Dec 2, 2010 at 22:02
  • @Menew: Do you get some line numbers etc.? IE is not very precise about that, but it is better than nothing. Commented Dec 2, 2010 at 22:03

2 Answers 2

2

you best bet is to install google chrome web browser, navigate to the webpage and press CTRL+SHIFT+J to open up the JavaScript console: Will look lie so:

alt text

Sign up to request clarification or add additional context in comments.

3 Comments

He says that the error occurs in IE. Chrome is not going to help much here. He'd better use IE's debugging tools.
He also didn't say that the error doesn't occur in Chrome ;) and Chrome will typically hide script errors unless the console is open, whereas the IE is more often setup to show the error.
I was just about to say that if there is an error in the syntax then chrome would also pick it up, the JavaScript engine is not the DOM, where IE vs the rest of the browsers differ mainly in the DOM.
1

IE 8

Select Tools → Developer Tools from the main menu or toolbar.

Press F12.

IE 6 and IE 7

The best JavaScript debugger for IE 6 and IE 7 is the Microsoft Script Editor which comes with Microsoft Office. To enable debugging in IE, select Internet Options → Advanced and ensure that the "Disable script debugging" checkboxes are unchecked.

To view the generated HTML source for a document, install the IE Developer Toolbar. This provides a tree view of the DOM of the generated HTML source.

JavaScript code can cause memory leaks in Internet Explorer. The JavaScript Memory Leak Detector can locate JavaScript code that causes memory leaks.

Chrome And firefox

ctrl+Shift+j

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.