Results 1 to 2 of 2

Thread: Jquery not working in IE 8

  1. #1
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Jquery not working in IE 8

    Hi
    I am using the following jquery code. it is working in IE-7 but not in IE-8. Pls help me

    Code:
    <script type="text/javascript" src="/hr/_themes/Cardinal/jquery-1.7.min.js"></a>"></script>
    <script type="text/javascript">
    $(document).ready(function(){   
    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();
    
        $('#letternum').text(letternu);
        $('#natureofwork').text(Natureofwork);
        $('#contractorname').text(ContractorsName);
        $('#licensenno').text(LicenceNumber);
        $('#date123').text(LicenseDate);
        $('#dateofcommencement').text(JobCommencement);
      });
    
    </script>
    Last edited by jscheuer1; 11-14-2011 at 07:35 PM. Reason: Format

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Is this being run in a popup window? If not, get rid of all those:

    Code:
    ,window.opener.document
    Even if it is, this sort of syntax might work better:

    Code:
    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.
    Last edited by jscheuer1; 11-14-2011 at 07:52 PM. Reason: had some more thoughts
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •