Can't find variable: dialog

I have a web project that I’m in the early stages of developing and it’s relatively simple right now. I have a WebPage that presents a WebDialog on top of it, and it works fine in the following situations:

  • Debugging on my machines
  • Debugging when connecting to my machine from iPad locally
  • Built on my server when connecting from a desktop

The issue happens when I attempt to connect to the built app from an iPad. Any time a dialog is loaded into memory (or a webpage is opened that contains a WebDialog), I get the JavaScript error:

Error: Could not execute returned javascript: Can’t find variable: dialog

Any idea? There’s nothing special about the WebDialog’s code, and the error is thrown immediately when the web page is loaded that contains the dialog (before I even attempt to show the dialog)

Anything in the open events?

And have you upgraded to 2013r4.1? It fixes a complicated issue some developers were experiencing.

Nothing in the open/shown events. I’ve even removed all code from the Dialog so it doesn’t load any of the data into the fields to see if that was the issue but it isn’t. It is opened from the MenuAction event of a WebToolBar, and right now the only code is

Haven’t updated to 4.1 yet because of the 10.6 compatibility but I’ll install it and see if that helps.

Just built it with 4.1 and the same thing is happening. Here is the full error dialog that appears when simply showing the WebPage that contains the WebDialog (the dialog isn’t even shown at this point, it’s just loaded into memory because it’s part of the WebPage’s controls as was instructed to do in the WebDialog docs):

[quote]2013-12-20 19:57:09
JavaScript Error:
Error: Could not execute returned javascript: Can’t find variable: dialog

Source: Xojo.view.setHashTag("#admin");

new toolbar(‘Js8xZgBs’,[‘ButtonAction’,‘MenuAction’]);


Xojo.controls[‘Js8xZgBs’].vertical = false;

Xojo.controls[‘Js8xZgBs’].items = { Button1: { name: “Button1”,menu: “”,enabled: true,toggled: false,type: “button” },FlexibleSpace1: { name: “FlexibleSpace1”,menu: “”,enabled: true,toggled: false,type: “flex” },AccountMenu: { name: “AccountMenu”,menu: “”,enabled: true,toggled: false,type: “menu” },all: [“Button1”,“FlexibleSpace1”,“AccountMenu”] };

Xojo.controls[‘Js8xZgBs’].styles = { ButtonDisabledStyle: null,ButtonStyle: null,ItemStyle: null,ToggledDisabledStyle: null,ToggledStyle: null };


new textcontrol(‘V3GusRoR’,[]);


new textcontrol(‘JUhww9me’,[]);

new textcontrol(‘LJFCizZf’,[]);


new textcontrol(‘D7Y2T8Sy’,[]);


new button(‘KGDM2oZL’,[‘Action’]);


new button(‘Vb4Netvv’,[‘Action’]);


new textlabel(‘VAzxAPW6’,[‘TextChanged’]);


new textlabel(‘DGksLJ5P’,[‘TextChanged’]);


new textlabel(‘OQFqBiQU’,[‘TextChanged’]);


new textlabel(‘Wd6GGDVv’,[‘TextChanged’]);


new dialog(‘G0Vs7G2x’,[‘Dismissed’]);



Xojo.controls[‘G0Vs7G2x’].minWidth = 0;

Xojo.controls[‘G0Vs7G2x’].minHeight = 0;

new frameworkObject(‘JbdehyvR’,[]);



User Details:

Wow. Are you using any 3rd party controls? Maybe try with a different browser?

Nope, very basic app. It works on every browser except for iOS devices (tested on Mac/Windows Firefox/Safari/IE/Chrome). Have not tested on Android.

Not sure if it’s related, but I did move some plugins to a separate folder so they don’t load (I have MBS as well), but I don’t think that would be affecting this. Is a plugin used for WebDialogs on iOS somehow?