"ph-web images based on a value"
Bodger, Simon
Simon.Bodger@cognos.com
Mon, 12 Mar 2001 12:26:18 -0500
PowerHouse web makes it easy to do this kind of thing without have to resort
to JavaScript, assuming that on your webserver you have you already have all
your images. In the example below they're in a subdirectory called
'images'.
QKS code segment:
------------------
; Set t_imagename to whatever your image is called.
temp t_imagename char*20
field t_imagename
procedure initialize
begin
let t_imagename="tomato"
accept t_imagename
end
------------------
In the template, this creates default HTML like this:
------------------
<td>T_IMAGENAME</td>
<td><input type="text" size="20" name="T_IMAGENAME"
value="<!--PH:VALUE:T_IMAGENAME-->"></td>
------------------
Which you can change to:
------------------
<td></td>
<td><img src="images/<!--PH:VALUE:T_IMAGENAME-->.jpg"</td>
------------------
Once it's been through the PowerHouse Web engine, it will get delivered to
the browser as:
------------------
<td></td>
<td><img src="images/tomato.jpg"</td>
------------------
Basically <!--PH:VALUE:T_IMAGENAME--> gets replaced with whatever's in
T_IMAGENAME.
Hope this helps.
Simon
-----Original Message-----
From: Johan Koelewijn [mailto:johan@vandijkgroep.nl]
Sent: 12 March 2001 15:20
To: powerh-l@sphere.swau.edu
Subject: "ph-web images based on a value"
Dear List users,
Does anyone have a powerhouse web technique for displaying images based on
the value of a field. Example : fieldvalue = TOMATO --> a tomato is
displayed.
Thanks,
Johan Koelewijn
Van Dijk Delft BV
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.