为什么我不能拖动,也不能调整我的数据表的大小

时间:2013-01-29 12:24:05

标签: javascript jquery google-maps google-visualization

在函数LoadXml()中,我使用google可视化表api创建表;我放入div。我还有另一个div,它将我的浏览器的整个页面带到谷歌地图上!

我想用表格拖动并调整我的div,我认为它应该可以正常工作 - 但事实并非如此。

 <html>
        <head> 
        <style>
          #wrapper 
          {
            position: fixed;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;


          }

        #table 
        { position: absolute; 
        top: 10px; 
        left: 10px; 
        width: 150px; height: 150px;

         }


      </style>


 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
    google.load('visualization', '1', {packages: ['table']});
    </script>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=AIzaSyBwQlpVsFgaZ2EjeUSeQiSICP1UwPV9o9c" type="text/javascript"></script>
    <script src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js"></script>


<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />



    <script type="text/javascript">

  $(function() {
$( "#table" ).resizable();
});

 $(function() {    $( "#table" ).draggable();  });


    function initialize() 
    {
        if (GBrowserIsCompatible()) 
        {
            map = new GMap2(document.getElementById("wrapper"));
            map.setCenter(new GLatLng(42.143365, 24.751032), 13);
            map.setUIToDefault();


        }
    } 



    function loadXMLDoc(l)
    {    
        arrayMyAddresses = [];  
        intPNum=l;
        s=l;

        xmlhttp.onreadystatechange = function() 
        { 
            if (xmlhttp.readyState==4 && xmlhttp.status==200) 
            {
                //alert(xmlhttp.responseText);
                var xmlObj = xmlhttp.responseXML;   
                var textXML = xmlObj.documentElement.firstChild.firstChild.nodeValue;

                //parsing data 

                //create array with name rec to hol our data for the datatable
                var rec = new Array();

                tblTst = google.visualization.arrayToDataTable(rec);

                visual = new google.visualization.Table(document.getElementById('table'));



            }

        }


// making ajax call to the server 

    }





</script>
</head>
<body onload= "loadXMLDoc(1),initialize();">
<div id = "wrapper"> </div>
<div id = "table" ></div>


</body>
</html>

0 个答案:

没有答案