Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

svg loading not working

  • 1 ответ
  • 9 имеют эту проблему
  • 7 просмотров
  • Последний ответ от Jonathan Watt

more options

Hi there,

I have a CGI script that contains inline svg and jQuery date picker.

When I use application/xhtml+xml header, it load everything fine, but date picker doesn't work on IE9. So I changed it to text/html, it works in IE9 but firefox 3.6 fails to display inline svg even though I use . But firefox 4.0b12 works fine with this heading. Could someone help me with this and how to make my inline svg displayed on firefox 3.6 and compatible with IE9? what's the difference between 4.0b12 and 3.6.14 with regard to the treatment of inline SVG? Thanks for your kind help! Cheers, Peter

Hi there, I have a CGI script that contains inline svg and jQuery date picker. When I use application/xhtml+xml header, it load everything fine, but date picker doesn't work on IE9. So I changed it to text/html, it works in IE9 but firefox 3.6 fails to display inline svg even though I use <html xmlns="http://www.w3.org/1999/xhtml">. But firefox 4.0b12 works fine with this heading. Could someone help me with this and how to make my inline svg displayed on firefox 3.6 and compatible with IE9? what's the difference between 4.0b12 and 3.6.14 with regard to the treatment of inline SVG? Thanks for your kind help! Cheers, Peter

Все ответы (1)

more options

Support for inline SVG in text/html was only added in FF4, so you'll need to use application/xhtml+xml if you want that to work in FF3.6.

If you must use text/html then one possible solution for 3.6 is to use a script to parse the SVG using https://developer.mozilla.org/en/DOM/DOMParser and then insert the result into the DOM of the text/html page.