Reputation: 75
In my aspx page:
<script type="text/javascript">
Ext.onReady(function() {
Ext.get('mb1').on('click', function(e) {
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?', showResult);
});
function showResult() {
Ext.example.msg('test');
</script>
<div>
<asp:Button ID="mb1" runat="server" Text="Button" />
</div>
I got error message "ext is undefined". Can anyone help me?
Upvotes: 1
Views: 8522
Reputation: 75557
ext
" somewhere instead of "Ext
" (wrong capitalization)?}
"Once you get Ext working, you'll probably want to use the button's client ID instead of the code-behind ID:
...
Ext.get('<%=mb1.ClientID%>').on('click', function(e) {
...
Upvotes: 1
Reputation: 76
you should download the extjs framework from the site itself and host it locally if you can. http://extjs.com
Upvotes: 1
Reputation: 5931
Include below all three file in your file ext-all.css,ext-base.js,ext-all-debug.js
Upvotes: 0
Reputation: 187110
You have to include the js file like
<script type="text/javascript" src="extjs.js"></script>
before using any of the functions.
Upvotes: 8