Geogebra API not completely working on Edge

Javier Cayetano Rodríguez shared this problem 1 year ago
Not a Problem

I am using the API to access some variables on a geogebra applet. Everything seems to work fine, but when I tried to use it on MS-Edge, something goes wrong.

- The applet load indeed, but its "onload()" function code is not executed despite I even use the "useBrowserForJS" argument.

- Also, it is possible to drag some elements of the applet (input boxes and the very screen) which are supposed to be fixed. This does not happen on Chrome nor Firefox [windows version].

Is there anything I can do to fix this? Thank you.

I copy here the script code I am using to load the applet.


<div><script type="text/javascript" src="https://cdn.geogebra.org/ap... type="text/javascript">// <![CDATA[var applet1 = new GGBApplet({material_id: "VgHhQXCC", borderColor:"#FFFFFF", playButton: true,useBrowserForJS: false,enableLabelDrags: false}, true);

window.onload = function() {applet1.inject('applet_container1');}

// ]]></script>

<div style="width: 656px; height: 363px; display: block;" id="applet_container1"></div></div>

Comments (5)

photo
1

Please post a link to your example

photo
1

I am sorry I don't have a link to post. It is just that when I, for example, try to include material

https://www.geogebra.org/m/VgHhQXCC

using a script in a webpage (so I can have access to the variables inside the applet),

everything works fine on chrome, safari and firefox, but it does not on Edge.

On Edge, it is possible to drag the screen and the input boxes, and the ggbOnInit() function is not ran.

[*] It is true that if I load the applet as an iframe, it works well also on Edge. -but using an iframe I cannot access the variables inside the applet-

But it happens with all the other applets I have tried.

photo
1

I am attaching an .html file which runs the script I mentioned before -by opening it using Edge and Chrome it is possible to appreciate the difference-, and a .gif image showing the problem which happens when I use Edge. (Appart from the problem that ggbOnInit() function is not run).

Thank you.

photo
1

It seems fine here in this simplified version - I suggest you work from there and add in the extra bits in your file.http://test.geogebra.org/~m...

photo
1

Thank you very much. That code works! [*] I do not know much about javascript, and I got the previous code from the API documentation here.


I can also see there is a wonderful fullscreen button available.

I wonder if it is possible to include it in geogebratube applets or in iFrames... I will ask for it on a new thread.

Thank you again

photo
© 2019 International GeoGebra Institute