I'm getting an error only in IE (v8, I don't know if it happens in older IE versions, but it does not occur in Chrome or Firefox) which brings me the following message when I use IE dev tool's debbuger:
Breaking on JSScript runtime error - Object Expected
Here is my affected code:
$('#deviceProfileSelection').change(function() { //affected line!!!!
// rest of my code...
});
This element #deviceProfileSelection
is defined as the following:
<select id="deviceProfileSelection">
<option value=""><?php echo getSysMessage("dropDownSelect")?></option>
<!-- and other values...-->
</select>
I've already tried defining the .change listener into a $(document).ready(function () {});
but no success at all. Any other idea?
EDIT
I was trying to include a div using a PHP decision structure, where if a condition was true, it should print a div. But, actually it wasn't printing, I mean, it wasn't printing the opening tag 'div', only the closing tag 'div'.
The browsers could interpret this error, but IE8, and this IE inability was causing the issue.
The problem is that you haven't added jQuery into your code at all.
Add the following inside the <head>
tag:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
That should fix your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With