By natepb007 on
I have Simile Timeplot on a node working in Firefox, but not Internet Explorer. The same Timeplot code placed in the html of another site shows up in IE, it's only when I move the code into Drupal that I see errors in the way the graph is formatted (no data lines/colors shown, only data values).
I'm guessing there is something different in how IE interacts with CSS inside of Drupal vs. outside, though Firebug Lite shows no errors or missing CSS files in IE.
Has anyone encountered similar issues?
I'm new to Drupal but have a lot of experience coding Simile Widgets.
Thanks
Comments
IE cannot even tell that it
IE cannot even tell that it is interacting with Drupal. Drupal is a software that outputs HTML/CSS/JS and sends it to the browser. As far as the browser is concerned, someone could be typing this HTML/CSS/JS live and sending it to the browser, or it could be hard coded, or it could be a software. The point is at the browser level, it doesn't matter how the HTML/CSS/JS is generated, the method is completely irrelevant. All that matters is what data is sent in the HTML/CSS/JS. So look through the page source (right click on the page and select 'view source') and compare it to the source where it's working, and try to find what the discrepancy is.
Contact me to contract me for D7 -> D10/11 migrations.
yes, I copied the code
yes, I copied the code exactly. It is simply JavaScript and one div.
when I placed it in a node body, the only thing I changed was switching:
with:
The rest is exactly the same (cut and paste).
Is this the correct way to put JavaScript inside a node's body?
The code works in IE if I put it inside an HTML document and place it on my site at "mysite.com/drupal/sites/all/themes/danland/test.html".
Placing it in a node body will cause problems in IE, even when using the Stark theme. I will continue looking as to why IE has trouble reading javascript/CSS inside a node, while other browsers can interpret it fine.
You need to examine the
You need to examine the outputted HTML to see where the difference is. Right click on the page and choose 'view source' or 'source' or something like that (depending on browser). Compare this to the source that works.
As for pasting your javascript into the div - I wouldn't do it this way, I'd create a module. But if this way works for you, then you can use it. That said, are you choosing the PHP input format for this page? Because if you aren't, Drupal will strip the script tag from the body. Also, have you confirmed this is working on other browsers, and that it's only IE that is failing?
Contact me to contract me for D7 -> D10/11 migrations.
the page source on both
the page source on both browsers are the same. yes, it works both in chrome and firefox. There must be some extra features of drupal that are interfering with how IE sees the page.
JavaScript runs on the
JavaScript runs on the browser, using the HTML and JavaScript provided. Drupal runs on the server. JavaScript doesn't even know of the existence of Drupal. It simply acts on the output of a Drupal script. So there has to be a difference in the page source, or you would not be having the troubles.
Contact me to contract me for D7 -> D10/11 migrations.
ur input filters may be
ur input filters may be stripping out JS etc,.
Create a new text format at q=admin/config/content/formats
You may call it RAW ,. (be careful in giving permissions to users to use this filter)
Do not add any filters to this input format,.
Save the input format.
For the page/post that you are encountering the issue, use this input format instead of Filtered HTML or Full HTML,.
works in IE 9, must be
works in IE 9, must be something to do with older versions of IE, I think thats good enough for me