Login
Register
Questions
Unanswered
Tags
Users
Ask a Question
Tips
Sawtooth Software Home
Most popular tags
cbc
lighthouse-9
acbc
ssi-web
maxdiff
ssi-web-8
javascript
cbc-hb
grid-question
constructed-list
unverified-perl
ssi-web-7
free-format
skip-logic
alternative-specific-design
select-question
willingness-to-pay
choice-simulator
cbc-latent-class
quota-control
mbc
acbc-hb
pass-in-fields
conditional-pricing
smrt
Have an idea?
Visit
Sawtooth Software Feedback
to share your ideas on how we can improve our products.
Image Selection for HTML Coding from SSI Script
Does anyone know how to make the img src called using SSI script?
[%GraphicsPath()%] obviously works but I want to use a constructed list to pull 4 semi-random images in for brand evaluation in a droppable freeform item.
ssi-web
asked
Nov 10, 2017
by
Corey1975
Bronze
(
980
points)
Your comment on this question:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
[captcha placeholder]
To avoid this verification in future, please
log in
or
register
.
Your solution to the original question
Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
1 Answer
+1
vote
You can just create a list where each item in the list is using the image tag as the text. Then construct a randomized list from that and you can call upon the items from the randomized list to be shown where you want.
answered
Nov 10, 2017
by
Jay Rutherford
Platinum
(
52,770
points)
I had tried: <img src=""[% GraphicsPath() %][% ListValue(brandlist, 1) %]
Where the brandlist list had "brand1.png" as the value.
Or should I just use <img src="[% ListValue(brandlist, 1) %]"
Where brandlist are values like "graphics/brand1.png"...
Let's assume you create a parent list called 'Images' with 3 items in the list representing images for brands 1-3 as follows:
1 <img src="[%GraphicsPath()%]brand1.png" alt="" border="0">
2 <img src="[%GraphicsPath()%]brand2.png" alt="" border="0">
3 <img src="[%GraphicsPath()%]brand3.png" alt="" border="0">
Then you could create a constructed list where you want to randomize those images (call it 'RandImages') using the logic:
ADD (Images)
Randomize()
The you could call upon the first image in that list with [% ListLabel(RandImages, 1) %]. That will bring up the first image in your randomized list. I think that should take you the direction you are looking for, but if not let me know and I can clarify.
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
[captcha placeholder]
To avoid this verification in future, please
log in
or
register
.
...