You are here: Re: [PHP] IE and AJAX returning HTML with <link stylesheet> « PHP « IT news, forums, messages
Re: [PHP] IE and AJAX returning HTML with <link stylesheet>

Posted by Jochem Maas on 10/04/81 11:33

Georgi Ivanov wrote:
> Hi,
> I have application that does this:
> When one press a specific button, I'm calling JS function that make http(ajax)
> request to some php file . The php returns HTML like this :
> ------------------------------
> <link href="left.css" rel="stylesheet" type="text/css" >
> <p>SOME HTML HERE</p>
> ------------------------------
> The returned HTML i placed in <div> tag.
> The logic is as follows:
> When one click on link "left", the php file returns <link> with specific CSS
> (left.css). If other button is clicked, the PHP returns html with other CSS
> linked.
> Everything is OK in Firefox. The problem is in IE . It appears that IE
> doesn't evaluate the CSS in <link> tag in returned HTML.

<link> is only allowed in the HEAD of a document no?

my suggestion would be to use DOM methods to
extract the <link> params from the XML you get from the
php script you call via XHTTPRequestObject (or whatever the
*** its called) and then use some more DOM methods to inject
a new <link> element into the HEAD of the doc.

also try googling for 'stylesheet switcher' for possible
alternative approaches....

oh and what was the php question again? ;-)

> Any suggestions?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация