I'm having a lot of problems with IE7/IE8 and Javascript/jQuery, which I don't have in Chrome or FireFox.
I have this Javascript function:
function changeImg(img,bla){
$('#open_case').css("background-image", "url('"+img+"')");
getIngo(bla);
navigation_image(bla);
}
And this is my onclick function:
<div class="cImage" style="background-image:url('http://bla.com/images/this_image.jpg');" onclick="changeImg('http://bla.com/images/this_image.jpg','2');"></div>
But it's like the function isn't called at all, 'cause if I change the changeImg function to an alert function:
function changeImg(img,bla){
alert('hi!');
}
It still doesn't work.
The only error IE7/IE8 gives is Expecting Object
(roughly translated)
What am I doing wrong?
Thanks in advance!
[Edit:]
These are lines IE7/IE8 is pointing at;
<script type="text/javascript" src="Scripts/swfobject.js"></script>
<script type="application/javascript" language="javascript">
function clearText(textfield){
if (textfield.defaultValue == textfield.value){
textfield.value = '';
$(textfield).css('color','#000000');
}
}
function addText(textfield){
if (textfield.value == ''){
textfield.value = textfield.defaultValue;
$(textfield).css('color','#999999');
}
}