View Full Version : Jquery not working in IE 8

11-14-2011, 04:39 AM
I am using the following jquery code. it is working in IE-7 but not in IE-8. Pls help me

<script type="text/javascript" src="/hr/_themes/Cardinal/jquery-1.7.min.js"></a>"></script>
<script type="text/javascript">
var letternu= $("[title='Letter Numer']",window.opener.document).val();
var Natureofwork= $("[title='Nature of work']",window.opener.document).val();
var ContractorsName= $("[title='Contractors Name']",window.opener.document).val();
var LicenceNumber= $("[title='Licence Number']",window.opener.document).val();
var LicenseDate= $("[title='License Date']",window.opener.document).val();
var JobCommencement= $("[title='Job Commencement/Completion Date']",window.opener.document).val();



11-14-2011, 07:42 PM
Is this being run in a popup window? If not, get rid of all those:


Even if it is, this sort of syntax might work better:

var letternu= $(window.opener.document).find("*[title='Letter Numer']").val();

But the problem might be that access to the opener's document is denied or requires a different object to access it.

Is it perhaps in an iframe?

In any case, it would help us to help you if we had a link to the page.

Please post a link to a page on the web that contains the problematic code so we can check it out.