views:

77

answers:

2

In one of my projects I'm using simplemodal to load a dialog that contains a function setup_dialog(). I use the simplemodal callback onShow() to execute setup_dialog(). This functions perfectly in Firefox. But in IE I get an error about setup_dialog() not existing. Is this a known limitation of IE (hard to believe) and what can I do to fix it?

The code fails in all versions of IE

My code that shows the dialog

$.modal(data, { onShow: function(dialog) { setup_dialog(); });

The code in the ajax loaded dialog:

function setup_dialog() { // dialog script here }

Kind regards, Michael

+1  A: 

Could be a simple syntax error - you open two curly braces, but closed only one:

$.modal(
    data, { 
       onShow: function(dialog) { setup_dialog(); }
    } //Missing!
);
Kobi
A: 

Turns out the culprit was an extra tag at the end of my page.

I can't believe IE would trip over something that trivial. Granted the syntax was flawed but common :(

Either way, thank you all for your help and answers!

Michael Anckaert