Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jquery-Not working in IE8

Status
Not open for further replies.

mravimtnl

MIS
Nov 1, 2009
47
Hi
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">
$(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>











regards
ravi
 
So how is it not working? Does it not populate the elements?

Do you get any errors?

What does the HTML look like?

Help us help you.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
if this is a copy and paste, the first line would cause problems, as the html is not well formed.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Hi

Thanks for responses. I figure out my mistake. I am calling this page from cross domain thefore the fileds are not getting populated (access denied error).

regards
ravi
 
you can use a jsonp call to work around cross domain ajax calls.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
That or simply submit the form elements to the other page, rather than trying to access them with PHP.
Since you are already opening another file, seems actually submitting the values would be the cleaner alternative.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
good point :)

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Thanks for responses.

Now my code is functioning in IE 8 also.
regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top