PDA

View Full Version : [2.2] MessageBox: btn will always be 1 when using with Prototype



Northrog
15 Aug 2008, 5:28 AM
Hello,

I found a bug when using prototype and Ext at the same time (bug tested in ff3/ie7 on vista):

When you include the prototype.js from the ext framework (not yet tested with an external prototype.js), and also include the "normal" Ext framework (ext-all.js and so on), the btn-value of a function of the syntax function(btn, text) { alert(btn) } as the callback of a Ext:MessageBox will always be 1, REGARDLESS of the button you clicked.

Hope the helps you,

Northrog

Sriram Ramani
10 May 2011, 4:14 AM
You are 100% rite. I've encountered such a problem

Sriram Ramani
11 May 2011, 12:57 AM
Guys,

Sorry for the above one. First i too got the same problem, but when i include my files in this order it seems to work :D

<link rel="stylesheet" type="text/css" href="ext-2.3.0/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-2.3.0/adapter/prototype/prototype.js"></script>
<script type="text/javascript" src="ext-2.3.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-2.3.0/ext-all.js"></script>

Huray :)