<script> inside tooltip?

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Laura Gilbert on 6th May 2013
Hi,
If I write text into a tooltip containing say <div> or <img> tags it works perfectly. However it appears to ignore <script> tags (so I can't make it throw out a javascript alert, say). Is that expected behaviour? Is there a work around?
I ask because I'm trying to display a google map in a tooltip and it's proving pesky.
Many thanks,
Laura
Posted by RGraph support on 6th May 2013
Hi there,

You can add <script> tags to tooltips by breaking up the closing script tag - however because the content of the tooltip is assigned by innerHTML - the JavaScript won't be executed.

obj.Set('chart.tooltips', ['<scr' + 'ipt>alert(4678678);</scr' + 'ipt>' ...]);


Richard, RGraph Support

1 Year Priority Support now reduced to £299:
   www.rgraph.net/support

Add a reply




« Back to message list