1

This code doesn't run in IE but runs in google chrome.

My code

$('iframe[height="350px"]').attr('src',_spPageContextInfo.webServerRelativeUrl+"/Reports/tt.rdl");
5
  • Which version on jQuery you are using? Which version of IE you are using?
    – moe
    Commented Jun 13, 2017 at 10:30
  • IE 11 and jquery 1.9
    – farbod68te
    Commented Jun 13, 2017 at 10:32
  • How have you imported the jQuery to your page? Could you edit to the original question?
    – moe
    Commented Jun 13, 2017 at 11:38
  • It going to be difficult to pin-point the problem with such limited information. Could you please elaborate on more of the details? Commented Jun 13, 2017 at 14:02
  • What version of SharePoint are you using? Also, what emulation mode is IE in when viewing your page? (right click on page->inspect element->Emulation tab).
    – maleman
    Commented Jun 13, 2017 at 17:50

2 Answers 2

2

I believe this is a IE issue. My experience with iframes is that you can't do anything with them in IE. Changing the src dynamically is hazardous to IE's health. We switched an entire company to Chrome due to IE limitations with iframes. I vaguely remember this was one of those issues.

https://stackoverflow.com/questions/1707032/internet-explorer-how-to-change-iframes-src

Terrible...

0

The HTML height attribute doesn't take units (unlike the CSS height property).

So try it without the "px".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.