2

Is Simpledialog2 not supported select menu in jQuery Mobile ?

Because when I use select menu in Simpledialog2, I get error like as under, "Uncaught TypeError: Cannot read property 'jQuery1910010748725151643157' of undefined"

And if I do not use select menu than it's working fine, how strange it is.

I am trying without select menu as under, It's working fine.

<div id="inlinecontent" style="display:none;">
    <div data-role="fieldcontain">
        <fieldset data-role="controlgroup">
          <label>My Label</label>
          <input value="myval" type="text">My Value</input>
        </fieldset>
        <a rel='close' data-role='button' href='#'> Close </a>
    </div>
</div>

And now I am trying with select menu, I get Uncaught Type Error in console and it's not working :(

<div id="inlinecontent" style="display:none;">
    <div data-role="fieldcontain">
        <fieldset data-role="controlgroup">
            <select>
                <option value="1">One</option>
                <option value="2">Two</option>
            </select>
        </fieldset>
        <a rel='close' data-role='button' href='#'> Close </a>
    </div>
</div>

My js code as under,

    $(self.el).find('#inlinecontent').simpledialog2({
        mode: 'blank',
        headerText: 'My header text',
        headerClose: true,
        blankContentAdopt: true,
        blankContent : true
    });

Can any one help me to fix this?

Any help appreciated.

Serge P
  • 982
  • 2
  • 20
  • 35

1 Answers1

1

If possible dont use Simpledialog2 with jQuery Mobile. Last version was made to work with jQuery Mobile 1.0.1. That was a long time ago and a jQuery Mobile has changed a lot since then.

You should use jQuery Mobile native dialog or native popup instead. You will get same functionality and unlike Simpledialog2 these are not 3rd party plugins.

One of possible reasons why this is not working because jQuery Mobile don't support 2 popups at the same time. When select is opened its will show a popup (unless it is turned off, but default state is popup select) and because Simpledialog2 is already a popup it will throw an error.

Gajotres
  • 57,163
  • 16
  • 99
  • 128