on a webpage in under developmnt i'm getting this error on IE
element = $(element);
this code is in prototype.js
Object expected
How to get rid of this error.
Update:
jQuery is also being used on site.
on a webpage in under developmnt i'm getting this error on IE
element = $(element);
this code is in prototype.js
Object expected
How to get rid of this error.
Update:
jQuery is also being used on site.
Is "element" the id of your element? If so try making it element = $("element")
your statement should be
element = $("id of element")
suppose you have the following code.
<div id="mainDiv">
...
</div>
To access this control, in prototype, it is
element = $("mainDiv");
UPDATE:
Based on your comment, you can combine both jquery and prototype in the same page.
var J = jQuery.noConflict();
After this statement, $("#foo") will be J("#foo").
You need to put a var in front of the variable assignment when the variable and element id are the same in IE.
var element = $(element);