开发者

tried accessing extjs google api but its not working

here is my index.html

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <script src="https://www.google.com/jsapi?key=ABQIAAAApcJBmCUpoKck8JpBmwHQ3xT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQmzpYh64Zi3KQreNTsD6jqiql5rA" type="text/javascript"></script>
    <script language="Javascript" type="text/javascript">
    //<![CDATA[

      google.load("ext-core", "3.0.0");
      google.load("jquery", "1.5.1");

    //]]>
    </script>
    <title>Reseller DashBoard</title>
    <!-- ** CSS ** -->
    <!-- base library -->
    <link rel="stylesheet" type="text/css" href="./ext/resources/css/ext-all.css" />
    <link rel="stylesheet" type="text/css" href="./ext/resources/css/xtheme-gray.css" />

    <!-- overrides to base library -->


    <!-- ** Javascript ** -->
    <!-- ExtJS library: base/adapter -->
    <script type="text/javascript" src="./ext/adapter/ext/ext-base.js"></script>
<!--     <script type="text/javascript" src="./ext/ext-all.js"></script>
 -->    
    <!-- ExtJS library: all widgets -->


    <!-- overrides to base library -->
    <!-- extensions -->


    <!-- page specific -->
    <script type="text/javascript" src="application.js"></script>
    <script type="text/javascript" src="js/Application.DashBoardGrid.js"></script>
    <script type="text/javascript" src="js/Application.DashBoardForm.js"></script>
    <script type="text/javascript" src="js/Application.ResellerGrid.js"></script>
    <script type="text/javascript" src="js/Application.ResellerIroGrid.js"></script>
    <script type="text/javascript" src="js/jsfunction.js"></script>


</head>
<body>
    <div id="dashboard">
    <!--     <table border="1" align="center" width="80%">
            <tr>
                <th align="center"><b>From Date&nbsp;&nbsp;</b></th>
                <th align="center"><input type="text" name="from_date" size=10  value=''>&nbsp;&nbsp;&nbsp;
                    <img align='absmiddle' style='cursor:hand' src='popcalendar/date-choose.gif' onclick='popUpCalendar(this,document.index.from_date,"yyyy-mm-dd",65,53)'></th>
                <th align="center"><b>To Date</th>
                <th align="center">
                    <input type="text" name="to_date" size=10  value=''>&nbsp;&nbsp;&nbsp;
                        <img align='absmiddle' style='cursor:hand' src='popcalendar/date-choose.gif' onclick='popUpCalendar(this,document.index.to_date,"yyyy-mm-dd",65,53)'></th>      
                <th><input type="submit" id="datesubmit"name="submit" value="Submit"></th>
            </tr>
        </table> -->
    </div>
</b开发者_JS百科ody>
</html>

giving me error

Ext.onReady is not a function

Please suggest what to do ?


There is no function onReady in that included .js document - are you sure you've got the right one, or it has everything included within it?


Your includes are a complete mess. There is no reason to be including core and core-debug (the same thing in 2 versions, and they most definitely are not "overrides to the base library"), nor is there any reason to load core along with ext-base. Ext-all (or all-debug) would still be required, yet it's commented out. jQuery is also thrown in, but the jQuery Ext adapter is not included, so not sure what the intention is there. Not sure what you're referencing for this, but you appear to have mixed a bunch of stuff together without understanding what it is.

If you open up any tutorial or example that uses Ext 3.x you'll see the proper required includes: ext-base.js and ext-all(-debug).js (plus the css), that's it. Why don't you start there and try to get it working.

ext-core(-debug).js is the core lib separated out for use by itself, and it's intended to be used completely standalone. If you're using the Ext widget framework to develop an app then you don't need core, or its Google load API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜