Run Extjs And Jquery On The Same Page
Jun.28, 2011 in
Extjs
Are you extjs programmer? Are you jquery programmer? Don’t worry, you can run both of them on same page. I will give you some tips to avoid a crashes. Below is the part of code:
<html>
<head>
<link href="css/extjs/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
//include your jquery library
<script type="text/javascript" src="js/jquery.js"></script>
//include adapter for using extjs and jquery on same page
<script type="text/javascript" src="js/extjs/adapters/ext-jquery-adapter.js"></script>
<script type="text/javascript" src="js/extjs/ext-all.js"></script>
<script type="text/javascript">
$().ready(function(){
$('#askme').click(function(){
Ext.Messagebox.confirm('Pertanyaan', 'Apakah anda suka framework.web.id?');
})
})
</script>
</head>
<body>
<button id="askme">Ask Me!</button>
</body>
</html>
The important code is below :
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/extjs/adapters/ext-jquery-adapter.js"></script> <script type="text/javascript" src="js/extjs/ext-all.js"></script>
They should be sequentially. Tyr it. Done !
You can run extjs with other javascript framework such as prototype, jquery, yui. See include-order.txt file at extjs root directory and try it same as my way above.
| incoming terms | |
|---|---|

Leave a Reply