IE 8 JavaScript eval() Problem. Alternative?

60 pts.
Tags:
EVAL function
IE7
IE8
Internet Explorer 8
JavaScript
Web development
Just installed IE 8 and some of my code on sites where I use eval() has broken. I use some eval functions and IE 8 is giving me an 'object requied' error. Code works in IE 7 and IE 8 when running in compatibility mode. I think this is an example of a code block that is giving me trouble. I need some help correcting this. I am getting object required on this line: y.style.height=parent.document.body.scrollHeight-61 + 'px'; Which could only mean parent.document.body.scrollHeight or y is invcorrect. I am going with y since I was reading about ie 8 and eval having issues. Is there a workaround? function launchP(A) { var y=eval("parent.document.getElementById('"+ A +"')"); y.style.height=parent.document.body.scrollHeight-61 + 'px'; }

Answer Wiki

Thanks. We'll let you know when a new response is added.

eval was not the issue, sorry bad code. couldn’t figure out how to delete this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BrentSheets
    Webmas609, thanks for posting back to let other members know. Much appreciated.
    6,925 pointsBadges:
    report
  • Lusy
    Have you tried to disable your java script to rescue this error? You can disable it here: > Open internet explorer > Tools > Internet Options > Advanced > Now go to the browsing windows option and check the option "disable script debugging" > Restart the internet explorer once Either you can try another browser like Mozilla Firfox. For more information you can visit at: www.iyogi.net
    825 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following