Hello all,

Im hoping i can get some help with what may be a simple fix.

Im using jquery to validate an image upload, and its working a treat.

However, the js file that the coding is on is called in the header throughout the site.

When the code isnt used (ie the page has no upload form) it throws an error in IE saying...

object doesn t support this property or method jquery

I assume its because it cant find the right form to run the code on?

Any ideas?

I tried firebug, and it wont load the page, it just hangs and highlights this line....

$().ready( function() {
31 $("#addImageForm").validate({
32 event: "keyup",
33 rules: {
34 image_title: { required: true },
35 image_filename:{ required: true,
36 accept: "(jpe?g|gif|png|GIF|JPG|PNG)"
37 }
39 },
40 messages: {
41 image_title: "The Image needs a name",
42 image_filename: {
43 required: "You need to select an image to upload",
44 accept:"Only image files are allowed. (gif, jpg or png)"
45 }
46 }
47 });
(line 44)