javascriptprototypejsfirefox4

Prevent this page from creating additional dialogs


Firefox4 has a new feature → 【Prevent this page from creating additional dialogs】

But it was also a trouble with me when I hope an alert dialog opened more than once.

Now, A new problem has appeared ...like below ↓

1) I call the alert dialog more than once , and check the  
  【Prevent this page from creating additional dialogs】
2) I click a download button , My web application is down.... 

(my button' event is below.... and because it hasn't into the action , so I'm just write the client source....)

My Button Event

getDownloadFile:function(){
    $('xform').submit();
}

My Page Code

<div style="display:none;">
    <form id="xform" action="down.do" method="post" target="xfra">
    </form>
</div>
<iframe id="xfra" name="xfra" src="/?scid=dummy.htm" style="width:0px;height:0px;visibility:hidden;"></iframe>

Hope anybody can help me ...thanks...


Solution

  • I am guessing the $ on your code means you are using jQuery (you should mention it in the tags if this is the case).

    If you are not using jQuery, then I don't know much of the other frameworks' selectors. However, if it is jQuery, your selector is not correct, it should be:

    $('#xform').submit();
    

    not

    $('xform').submit();
    

    Since you are using PrototypeJS, the above is incorrect.