aGuyNamedJonas
aGuyNamedJonas

Reputation: 1

JQuery UI Dialog will only show up while loading not after loading is done

First of all: Never asked a question here before but this community already has been great help in the past for all sorts of stuff. So thanks a lot for that.

We're having a problem with our JQuery UI dialogs. They will work fine and open up when you click on the corresponding link while the page is not done loading. But as soon as Chrome stopped spinning its little loading thingy you can click on the buttons/links all you want- nothings happens. Code won't help much I guess- pretty standard tutorial copy'n'paste just to get it running:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script>
<script>
    function showDialog(){
        $(document).ready(function(){
            $("#dialog").dialog({
                modal: true,
                buttons: {"Testbutton": function(){ $(this).dialog("close"); } } });
        $("dialog").show();
     });
    }

    $(function() {
    $( "#dialog" ).dialog({
        autoOpen: false,
                    modal: true
    });

    $( "#opener" ).click(function() {
                    $( "#dialog" ).dialog( "enable" );
        $( "#dialog" ).dialog( "open" );
        return false;
    });
});

<div id="dialog" title="Basic modal dialog" style="display:none">
    <p>dialog text</p>
</div>
<button id="opener">Testdialog</button>

Upvotes: 0

Views: 671

Answers (2)

aGuyNamedJonas
aGuyNamedJonas

Reputation: 1

Already....got a fix! Holy crap...that was a long way. And it's one of those really tricky ones- so here is the solution:

http://code.google.com/p/zfdebug/issues/detail?id=30

Thank you guys so much for helping! I got on the right path when Ross asked if there are any other JS errors. Thanks a lot for that!

Upvotes: 0

Ross Dargan
Ross Dargan

Reputation: 6021

Its probably because you have a javascript error later on in the page. If you use firebug do you see any errors in the javascript console?

Upvotes: 1

Related Questions