Solved

javascript not working in ie7

Posted on 2012-03-27
2
301 Views
Last Modified: 2012-03-27
This code works in firefox but not in ie7.  It also makes all of my other javascript codes fail in ie7.  Does anybody see something wrong with it.

$("#account_info").validate( {
							
	  errorPlacement: function (error, element) {  //puts the error message beside the label    
	   $('#'+element.attr("id")+'_label').append(error); 		 
         },
		 
		 
	  rules: { 
       profile_2: { profileNotEqualTo: "#profile_1"}, //profile 1 cannot be equal to profile 2  
	     },
		 
	  messages: { // custom messages
	   county_ansi: "Setting your location is required. Please enter a city or zip code to search."
		 },
		 
	  submitHandler: function(form) { //submits form and hide button shows loading
       $("#loading_box").show();
       $("#button_box").hide();
	   form.submit();    
         }
		 
	     });

Open in new window

0
Comment
Question by:Luey
2 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 365 total points
ID: 37772317
IE7 is fussy about javascript syntax. Could it be that line 13 needs a semi-colon at the end?
0
 

Author Closing Comment

by:Luey
ID: 37772565
I agree with fussy.  I took out this comma and it worked.  "#profile_1"}, //profile 1  
 I will try the semicolon.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

777 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