3.0 beta 2

Getting "No Data Found." with the Following Code... Help!!

I am simply getting a "No Data Found." message displayed within my ActiveWidget table. Below is the code that I'm using...

My main page code:
<script language="javascript">
<!--

    //	create ActiveWidgets data model - XML-based table
    var table = new Active.XML.Table;

    //	provide data URL
    table.setURL("xmldata.php");

    //	start asyncronous data retrieval
    table.request();

    //	define column labels
    var columns = ["ID", "Institution", "Country", "Status", "Exp. Date", "Research Collab.", "Faculty Exch.", "Student Exch.", "Grad. Exch.", "Undergrad. Exch."];

    //	create ActiveWidgets Grid javascript object
    var obj = new Active.Controls.Grid;

    obj.setAction("click", function(src){  
        var i = src.getProperty("item/index");  
        var j = src.getColumnProperty("index");  
        if (j==1) {  
            var link = "imoa_edit.php?imoaid=" + this.getDataProperty("text", i, 0); 
        	parent.hideSearchbox();
            document.location.href=link; 
        } ;  
    
    });  

    var row = new Active.Templates.Row;
    row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
    row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");
    obj.setTemplate("row", row); 		

    //	provide column labels
    obj.setColumnProperty("texts", columns);

    //	provide external model as a grid data source
    obj.setDataModel(table);

    //	write grid html to the page
    document.write(obj);

//-->
</script>


The source XML "xmldata.php" page:
<imoa>
    <application>
        <id>30</id>
        <institution>Agence de Développement Urbain (A.D.U.), Buskerud University College</institution>
        <country>Mauritania, Norway</country>
        <status>Current</status>
        <expdate>09-18-2006</expdate>
        <researchcollab>No</researchcollab>
        <facultyexch>Yes</facultyexch>		
        <studentexch>No</studentexch>
        <gradexch>Yes</gradexch>
        <undergradexch>No</undergradexch>					
    </application>
    <application>
        <id>31</id>
        <institution>Al Farabi Kazakh National University</institution>
        <country>Kazakhstan</country>
        <status>Pending Renewal</status>
        <expdate></expdate>
        <researchcollab>Yes</researchcollab>
        <facultyexch>Yes</facultyexch>		
        <studentexch>No</studentexch>
        <gradexch>No</gradexch>
        <undergradexch>No</undergradexch>					
    </application>
</imoa>


Any ideas why the widget is not working with this code, and simply saying "No Data Found."??

Thanks for your help!!
Senior Miguel
April 8,
Accent in xml file

Agence de Développement
------------?
April 8,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.