:: Forum >>
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">
<!--
var table = new Active.XML.Table;
var obj = new Active.Controls.Grid;
table.setXML(xmldata);
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);
window.open(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);
obj.setColumnProperty("texts", columns);
obj.setDataModel(table);
document.write(obj);
</script>
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,
MIKE
MIKE
Saturday, March 25, 2006
Mike,
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.
http://www.schiavoni.com/ActiveWidgets/examples/old/pages-1.htm
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.
Carl
Saturday, March 25, 2006
Carl,
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.
Thanks,
MIKE
MIKE
Monday, March 27, 2006
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
Monday, March 27, 2006
Actually Mike ... try this link:
http://www.schiavoni.com/ActiveWidgets/examples/old/pages-1-tabs.htm
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.
Carl
Monday, March 27, 2006
This topic is archived.
Back to support forum
Forum search