Image Not Displaying (only URL) in Grid (via XML)

I am using PHP to build my XML. Field #'s 6, 7, 8, 9, and 10 contain an image URL (either "images/imoa_check_on.gif" or "images/imoa_check_off.gif" depending on what is in the database for that field.

Currently, all that is being displayed in field # 6, 7, 8, 9, and 10 is simply the URL (example "images/imoa_check_off.gif"), however NOT the actual image.

I am using the following code to create my 1.0 grid...

<script language="javascript">

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

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

    //    provide XML data (see xml data island id) 

    //	define column labels
    var columns = ["ID", "Institution", "Country", "Status", "Exp. Date", "Research Collab.", "Faculty Exch.", "Student Exch.", "Grad. Exch.", "Undergrad. Exch."];
obj.setAction("click", function(src){  
    var i = src.getProperty("item/index");  
    var j = src.getColumnProperty("index");  
    if (j==1) {  
    var link = "imoa_view_details.php?imoaid=" + this.getDataProperty("text", i, 0); 
    } ;  

    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 

    //    write grid html to the page 	


I have searched inserting images into xml on this forum, however cannot get any of them to work.

What do I need to do to get my images to display (instead of the URL that is currently there)??

Thanks in advance for your time and help,
March 25,
Just curious ... take a look at the link below and let me know if this is what you are trying to do. It uses an XML data source. I am using ActiveWidgets 2.0 (as an FYI).

This link uses CSS to define the images.

I have another example I can post if you'd like it, where I'm reading the image file name from a column, but showing the image in a different column (the image is used as a link to open a PDF).

Let me know.
March 25,

I'm getting a PERMISSIONS DENIED javascript error while accessing that page. The ActiveWidgets grid is not displaying, however everything else seems to come up. Please advise.

March 27,
Sorry Mike. My Bad - I posted the page on my website but I'm using a dataset off our corporate website. Thus the permission denied.

I'll put a dummy dataset on my website and point the grid there.
Give me a few minutes.
It will be up and functional (using the URL above) in about 20 minutes (6:30 EST).

Thanks, Carl
March 27,
Actually Mike ... try this link:


I'm using ActiveWidgets TABS to swamp datasets. Thing is, I'm only use "A". If you click on any of the other tabs, you'll probably get a "permission denied" error.
But I figured you might find the code useful since it shows how to easily swap XML datasets in the grid.

Let me know if you have problems.

March 27,

This topic is archived.

See also:

Back to support forum