0

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>

2 Answers 2

1

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?

Sign up to request clarification or add additional context in comments.

1 Comment

@Rippo: Didn't work :/ and Ross: Thanks. I'm not sure if this gonna help but it's a very good hint. The thing is that I just started working for the project so there actually is a ton of errors in the chrome js-console. I'll try to eliminate those and if we don't have any errors left and the dialogs are still not working I'll just come back here :) Thanks guys!
0

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!

1 Comment

Could you explain a little more about the ultimate solution? Context would be most useful to the next person to have this problem, and having the answer right here is better than following links (which may break).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.