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 MyWebDialog.show

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’].setEnabled(true);

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 };

Xojo.controls[‘Js8xZgBs’].updateItemStyles();

new textcontrol(‘V3GusRoR’,[]);

Xojo.controls[‘V3GusRoR’].setEnabled(true);

new textcontrol(‘JUhww9me’,[]);

new textcontrol(‘LJFCizZf’,[]);

Xojo.controls[‘LJFCizZf’].setEnabled(true);

new textcontrol(‘D7Y2T8Sy’,[]);

Xojo.controls[‘D7Y2T8Sy’].setEnabled(true);

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

Xojo.controls[‘KGDM2oZL’].setEnabled(true);

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

Xojo.controls[‘Vb4Netvv’].setEnabled(true);

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

Xojo.controls[‘VAzxAPW6’].setEnabled(true);

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

Xojo.controls[‘DGksLJ5P’].setEnabled(true);

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

Xojo.controls[‘OQFqBiQU’].setEnabled(true);

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

Xojo.controls[‘Wd6GGDVv’].setEnabled(true);

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

Xojo.controls[‘G0Vs7G2x’].setEnabled(true);

Xojo.controls[‘G0Vs7G2x’].setResizable(false);

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

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

new frameworkObject(‘JbdehyvR’,[]);

Xojo.controls[‘JbdehyvR’].setEnabled(true);

Xojo.view.showPage(‘JbdehyvR’);

Xojo.view.dismissLoader();
User Details:
[/quote]

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?