#111 Better javascript support in internal browser

open
nobody
5
2011-12-07
2011-12-07
Burfee
No

Hi,
I was trying this tutorial http://jeffreybreen.wordpress.com/2011/07/14/r-one-liners-googlevis/ and i noticed that the graph doesn't appear. in rkward web browser. If i run R from the terminal and run the same script it works great when it starts in mozilla.

Script:
library(googleVis)
data(Fruits)
M = gvisMotionChart(data=Fruits, idvar="Fruit", timevar="Date", chartid="ILoveFruit")

Discussion

  • Thomas Friedrichsmeier

    • summary: Allow javascript in web browser --> Better javascript support in internal browser
     
  • Thomas Friedrichsmeier

    Hi!

    The problem is not that javascript is not allowed in the internal browser (it is allowed, unless you have configured konqueror otherwise). The problem is that the JS engine does not seem to be able to handle this, correctly. In the mid term, we will probably switch to a WebKit-based internal browser, and probably this will fix the issue. However, I'm very reluctant to do so right away, since it would break compatibility with older versions of KDE, which are still around on many systems.

    As a workaround, use
    plot (M, browser="firefox")
    to open in an external web browser.

    Regards
    Thomas

     
  • Burfee

    Burfee - 2011-12-07

    having tried on linux yet because i am at work, but from windows, using plot (M, browser="firefox") in KWard does not open a new window in firefox. Is there a problem with this in windows?

     
  • Burfee

    Burfee - 2011-12-07

    haven't*

     
  • Thomas Friedrichsmeier

    ...and I have only tested on Linux, not Windows, yet. But I would guess, it's simply a problem with the PATH. On Linux, firefox will typically be in the path, on Windows, I guess you will have to write
    plot (M, browser="C:\Programs\Mozilla\firefox.exe")
    or something similar (and in fact, browseURL(), which is the underlying function, does not appear to warn, if the browser executable cannot be found).

    BTW, looking at the source of browseURL(), I think writing
    plot (M, browser=NULL)
    should also do the trick on Windows.

     
  • Burfee

    Burfee - 2011-12-07

    yes, plot (M, browser=NULL) does the trick :D
    thanks!

     

Log in to post a comment.