W3C home > Mailing lists > Public > www-forms@w3.org > September 2005

Re: How to display an image depending on an intance data value

From: Catherine Poinsignon <catherine.poinsignon@lombard.lu>
Date: Tue, 20 Sep 2005 14:02:44 +0200
Message-Id: <s3301676.090@lombard.lu>
To: <catherine.poinsignon@lombard.lu>, <www-forms@w3.org>
I have tried the following solution I've found on 
http://www.codeproject.com/html/fP-and-weather-ws.asp (see step 4: Rendering images)
but it does not work. I see on the screen the text <img src="resource/images/green.gif"/>, not the image itself.
Could someone confirm that this only works with formsPlayer ?
 
.image
{
 display: block;
}
...
<xforms:output class="image" value="concat('&lt;img src=&quot;resource/images/',projectstatus,'.gif&quot;/>')">
                </xforms:output>
 
I am working with Novell exteNd 5.2.1.
Thanks again,
 
Catherine

>>> "Catherine Poinsignon" <catherine.poinsignon@lombard.lu> 20/09/2005 11:24 >>>

Hi all,
 
I have a model that looks like this :
 <xforms:model id="model_wsrp_rewrite_" schema="resource/schema/schemadt.xsd">
            <xforms:instance id="data_wsrp_rewrite_"
                nweb:pageflow-replace-data="always" nweb:primary-input-data="true">
                <data xmlns="">
                    <record>
                          ...
                          <projectstatus>green</projectstatus>
                          ...
                     </record>
                 </data>
            </xforms:instance>
        </xforms:model>
 
Dependiing on the value of projectstatus, I want to display an image :
if projectstatus = "green", the image source is "images/green.gif"
if projectstatus = "red", the image source is "images/red.gif"
 
How can I do that in xFroms ?
Thanks in advance,
 
Catherine







Received on Tuesday, 20 September 2005 12:03:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:01 GMT