« Return to Thread: Locks on firefox

Locks on firefox

by Ariel Falduto :: Rate this Message:

Reply to Author | View in Thread

Why this chunk of code freezes all mi firefox ???

anybody knows ... im currently trying to put some animated gif when
this file is loading but nothings happen cos' firefox locks everyting
=(

what can i do ??

NOTE: the size of "tab3.html" is 1 mb

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript">
                var djConfig = {isDebug: true};
</script>
<script type="text/javascript" src="scripts/dojo-0.3.1-ajax/dojo.js"></script>
<script type="text/javascript">
        dojo.require("dojo.widget.ContentPane");

function init() {
        var pane = dojo.widget.byId("Pane1");
        var status = dojo.byId("status");

        dojo.event.connect(dojo.byId("load"), "onclick", function(evt){
                // load a new url into contentPane
                pane.setUrl("tab3.html");
        });

        dojo.event.connect(pane, "onDownloadStart", function(evt){
                evt.preventDefault();
                dojo.debug("Download started");
                status.style.display = "block";
        });

        dojo.event.connect(pane, "onDownloadEnd", function(evt){
                // not defaultPrevent()'able
                dojo.debug("Download finished");
                status.style.display = "none"
        });

        dojo.event.connect(pane, "onDownloadError", function(evt){
                dojo.debug("Download error");
  //evt.preventDefault(); // or
                evt.returnValue = false;
                status.style.display = "none";
        })
}
dojo.addOnLoad(init);
</script>
</head>
<body>
        <div id="status" style="position: absolute; top: 400px; left: 400px; display:
none; background-color:yellow;">
                Downloading new content, please wait...
        </div>

        <a href="#" id="load">load some url into contentpane</a>

        <div dojoType="ContentPane" id="Pane1" style="border: 1px dotted gray;width:
200px; height:200px;">
                Initial content in contentpane
        </div>
</body>
</html>
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest@...
http://dojotoolkit.org/mailman/listinfo/dojo-interest

 « Return to Thread: Locks on firefox