I'm starting a new discussion because I ran out of points to award for all the great answers I'm getting! ![]()
Something is not quite right here:
<span spry:repeat="color" spry:setrow="color">
<label spry:if="function::standardColor"'=='{imageURLthumb}'">
<input type="image" name="rgColor" src="{color::imageURLthumb}" id="rgColor" onClick="newXPath('{Model}', '{color::imageURLthumb}', '{imgURLseat}', '{Canopy}', '{imgURLwheel}')" >
</label>
<label spry:if="function::standardColor"'!='{imageURLthumb}'">
<input type="image" name="rgColor" src="{color::imageURLthumb}" id="rgColor" onClick="newXPath('{Model}', '{color::imageURLthumb}', '{imgURLseat}', '{Canopy}', '{imgURLwheel}')">
</label>
</span>
<script>
function standardColor(rgn, doIt)
{
return doIt('{color::imageURLthumb}') == ("images/custom/thumb_White.png", "images/custom/thumb_Beige.png", "images/custom/thumb_Green.png", "images/custom/thumb_Blue.png");
}
</script>
It is only pulling in the last image in the list. But I'm getting two of them. I think the syntax in the function is wrong but I'm not finding any examples that show otherwise.
Thanks!!!
Shel
I'm sure there is a better way but this works...
<script>
//STANDARD COLORS
function white(rgn, doIt)
{ return doIt('{color::imageURLthumb}') == ('images/custom/thumb_White.png');}
function beige(rgn, doIt)
{ return doIt('{color::imageURLthumb}') == ('images/custom/thumb_Beige.png');}
function green(rgn, doIt)
{ return doIt('{color::imageURLthumb}') == ('images/custom/thumb_Green.png');}
function blue(rgn, doIt)
{ return doIt('{color::imageURLthumb}') == ('images/custom/thumb_Blue.png');}
</script>
<tr>
<td><p class="pbs">Standard:<br>
</p></td>
<td><span spry:repeat="color" spry:setrow="color">
<label spry:if="function::white">
<input type="image" name="rgColor" src="{color::imageURLthumb}" alt="White" id="rgColor" onClick="newXPath('{Model}', '{color::imageURLthumb}', '{imgURLseat}', '{Canopy}', '{imgURLwheel}')">
</label>
<label spry:if="function::beige">
<input type="image" name="rgColor" src="{color::imageURLthumb}" alt="Beige" id="rgColor" onClick="newXPath('{Model}', '{color::imageURLthumb}', '{imgURLseat}', '{Canopy}', '{imgURLwheel}')">
</label>
<label spry:if="function::green">
<input type="image" name="rgColor" src="{color::imageURLthumb}" alt="Grreen" id="rgColor" onClick="newXPath('{Model}', '{color::imageURLthumb}', '{imgURLseat}', '{Canopy}', '{imgURLwheel}')">
</label>
<label spry:if="function::blue">
<input type="image" name="rgColor" src="{color::imageURLthumb}" alt="Classic Blue" id="rgColor" onClick="newXPath('{Model}', '{color::imageURLthumb}', '{imgURLseat}', '{Canopy}', '{imgURLwheel}')">
</label>
</span>
</td>
</tr>
I know you're on the job! Thanks for all your help!
http://www.bspgc.com/customgramps1.html
I'm really sorry to pester you about this. I really appreciate all the help you've given me! But I'm running out of time. I've got it working but it is just way too slow. It takes 20 seconds to load the page and 10 seconds to load a selection. Is there any hope of using spry for this function? Or do I need to go back to the drawing board... Maybe if I nest the options in the xml file the server could find it faster?
Thanks again for all you do!
Shel
North America
Europe, Middle East and Africa
Asia Pacific