Raphael loading SVG file from server - raphael

I need to render the SVG file in the browser which is placed on the server. What I do is make an Ajax call to the SVG and render the response in the DOM. It works fine in Firefox and Chrome, but doesn't works in IE-8.
I know IE-8 doesn't supports SVG. Can we use RaphaelJS to cater the same situation?

How about using something like this to convert your SVG to RaphaelJS?
I just tried it with the classic svg tiger and it worked well.
EDITS
You could also do the conversion from SVG to Raphael on the fly. See here and here.

Related

How can I select a href tags in a QTextBrowser from QSS?

I would like to format my clickable URLs inside a QTextBrowser. In a QSS file that I set for the entire application, I've tried QTextBrowser::text.a and QTextBrowser.a, but neither worked. Am I actually expected to manually format every link using the Qt Creator editor, or is there a way around this?
You can’t use QSS for that, but QTextBrowser supports a subset of CSS, so you can make it part of the displayed HTML, or set a default stylesheet: QTextDocument::defaultStyleSheet.

Google charts - Control Wrappers fails on Ajax

I am using google charts to build a graph. Everything is working fine when loaded through browser.
I have different tabs which shows different data on click. I am using ajax to get the data and the graph works fine too, because i use
google.setOnLoadCallback(drawChart(data));
on success.
I am using google.visualization.Dashboard to make use of control wrapper and chart wrapper The control wrapper helps me to get the slider kind of thing which filters within the graph. And this works fine when loaded through browser. However on ajax load i am getting the slider change in values but it doesn't show the slider HTML.
what else need to be passed to achieve this when loaded through ajax ???
Let me know if anything needed !!!
I found the solution, thought it might help someone on this.
The google load initializer i was recalling on every ajax request, wherein this needs to be loaded only once.
google.load("visualization", "1.1", {packages:["controls",'corechart']});
So i used this above the dom ready statement.

Which Qt widget (not webkit) that can display html image link (like item list)

i like to display image from server without downloading it , sure i can use qwebkit.
but i like to be able to display the image in some kind of list . what option do i have ?
I know that QTextEdit supports img tags, and I use them in lists. However, I don't know if it actually supports full URLs for those images, I just use images from the resource file. You could however give it a try.
Use setHTML() to set the HTML source code, setText() assumes plain-text.
You -have to- download the image manually and load it into a QPixmap to show it. You can use libcurl to download the image, it's pretty solid and works on virtually any platform. And really easy to use.

Can Qt's QWebView display programmatically generated XML?

Using Qt 4.6, I can dynamically add to an HTML page like this:
ui->webView->page()->mainFrame()->documentElement().findFirst("body").appendInside("<i>some text</i>\n");
However, if I QWebView::load() an XML file, it displays it with the correct CSS styling (from an processing instruction), but doesn't show any changes when I do something like:
ui->webView->page()->mainFrame()->documentElement().findFirst("lines").appendInside("<line>hello</line>\n");
Why is it treating them differently, and is there a way to modify an XML document in the same way I can an HTML one?
Try using setUrl() rather than load(). If that magically works it's a bug.

Displaying (rendering) HTML from a string in QT

I have html in a QString, what widget can I use to display it?
(QWebView is not necessary as I dont access Internet)
QWebViews setHtml():
The QWebView class provides a widget that is used to view and edit web documents.
In Qt QWebView is the widget that renders pages for you - if you don't need the networking features it provides, simply don't use them.
Depending on what HTML tags you are using, you might be able to get away with a QTextEdit. It has support for most of HTML, including tables and images. Take a look at the docs and see if it fits your particular needs.
If you need something more advanced, then you will have to use the widgets in QtWebKit.