![]() |
AJAX and IE8 Doing my head in please help!
Hi Guys and Girls,
i am currently working on a project and have noticed that in ie8 when loading a php file using AJAX / JQuery.load() it will not load if the php contains and <script> tags!!! Only IE8 ???? If i remove the scripts from within the php file it works?? Any suggestions below is the code I'm using to load the php file Code:
var parts = window.location.href.split('?', 2); |
Why would you need to have <scripts> in your php page? Can't you find a way to have those scripts in your js page and have only PHP in your php pages?
|
I am using the php to pull events from mysql and to then output the names followed by a count down timer for which the variables are being generated within the while loop. Code below:
Code:
echo '<script type="text/javascript">';Even crazier than that is i have a similar system on another page which has no issues .... |
Well, I can't say what causes issues with IE8 (and cannot test under IE right now) but...
I wouldn't do it that way anyway. What I would do is: Have the JS to do an AJAX call to the PHP page, and have PHP to return all you need to construct your timer - but - I would construct the timer on the JS side and not on the PHP side. Hope this makes sense... |
I guess my question is why if i include the php directly on the page does it work but loading it through AJAX it doesn't?
|
Yes, I understand your question and I am sorry but I can't tell. Still I think the way you are doing it is not "best-practice" but I can't really tell you why it doesn't work.
|
| All times are GMT +1. The time now is 05:10 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.