Use of GoJs with Dojo/Dijit

At least in the simplest case, GoJS works well in an IFrame element:
[EDIT: obsolete]

That just loads [EDIT: obsolete] in an IFrame.

I have updated [EDIT: obsolete] to add a tab that contains an IFrame, loading [EDIT: obsolete].

This seems to work well for Chrome, IE, Android, and iPad. However, it does not seem to work for Firefox – I don’t know why.

Anyway, I’m wondering if you are using Firefox.

yes I do (firefox ESR).
I will double check with IE
tx

Hi,

Actually, I don’t have IE10 anymore but I cannot make it working on IE11.

Could you please try with IE11?

Thanks
Jeroen

I just tried opening in IE 11 on Windows 8.1 the three pages on gojs.net/temp that I mentioned in my previous two replies. All three worked correctly, including all three of the tabs within dojodemo.html.

Do those three pages not work for you in IE 11?

I also just tried those three pages in Firefox 38.0.5. Two worked: dojo.html and iframe.html. The third, dojodemo.html, mostly worked: the first two tabs (“GoJS Diagram” and “in Dialog”) worked, but “in iframe” did not work. As I said, I don’t know why in Firefox the IFrame inside a tab doesn’t work, even though the same code works in all other browsers, and even though a diagram in an IFrame works in the iframe.html page in Firefox.

Edit: I just tried all three pages in both IE 9 and Firefox 38 on Windows 7, and got the same results. Everything worked in IE 9; the two simpler samples and the first two tabs of dojodemo.html worked in Firefox, but not the IFrame within the tab.

Edit 2: All three pages work well on Android 4.4.2 using the Android, Chrome, and Opera browsers, but the dojodemo.html/IFrame case fails using Firefox on Android. Basically the same results as on Windows, but substituting the Android browser for IE.

Thanks Walter for these tests.
Your iFrame example works fine in IE11but not in Firefox ESR 31.7.0, when I access it directly from my browsers.

Now when I try to embed your example in my application, it does work even in IE11.

Can we do a Skype session so I could show you my code?

Walter,

no need to have a Skype session as the example works now in my configuration with IE11 after making code changes to simplify the page structure in terms of Dojo widgets.
I will look closely what widgets configuration is causing the problem.

but I need also GoJs in Firefox ESR as the tool I am using requires this version (i.e. ESR).

Jeroen

The example works fine with IE11 but not with Firefox ESR 31.7.0.

There is still a problem.

I wanted to remove the greetings div and the Hello text so this is the new HTML code:

<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"
        data-dojo-config="async: true"></script>
<script>
  function init() {
    require([ "http://gojs.net/beta/release/go-debug.js"],
      function(go) {
        makeDiagram(go);
      });
  }

  function makeDiagram(go) {
    var $ = go.GraphObject.make;
    myDiagram =
        $(go.Diagram, "myDiagramDiv",
          { initialContentAlignment: go.Spot.Center });

    myDiagram.model = new go.GraphLinksModel([
          { key: "Hello" },
          { key: "World" }
        ], [
          { from: "Hello", to: "World" }
        ]);
  }
</script>

As you can see, I have removed the Dojo/Dom in the Require statement and robe the creation of the greeting text.
Could you please explain why I still need to “include” the Google dojo.js script?
Removing the following line

<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"
        data-dojo-config="async: true"></script>

is causing the example not to work anymore.

Hmm. The obvious answer is that you need to load dojo so that you can call require.

And I guess the other obvious answer is that most of the GoJS samples, such as Minimal GoJS Sample, don’t need to load any definition of require in order to show a diagram.

But maybe that’s not what you really want to ask about.

I’m sorry about your code not working in Firefox & Dojo. I don’t know if it’s a Firefox bug or a Dojo bug or even my bug just because I don’t know anything about Dojo.

Ok. I understand now.

I have removed the require statement and thus the need for the inclusion of dojo.js (which was already included by the core code of the tool I am configuring).
By adding

<script src="http://gojs.net/beta/release/go-debug.js"></script>

I have a workable example.

I have noticed also that GoJs was upgraded since the start of this thread so maybe some of the changes made to it, indirectly fixed my issue.

Thank you a lot for you time and help.