Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
2 of 2
2
item options as a list
Posted: 26 July 2010 01:59 PM   [ Ignore ]   [ # 16 ]
Has a Nice Profile
Avatar
RankRank
Total Posts:  173
Joined  2010-04-08

I’m getting so close on this. its outputting the product in the list, but its not allowing me to “select” it.
Maybe I need to write some ajax to bring the “selected” item in view in this page? I can see the items, I just can’t select one.

Here’s the code:

<ul id="optdrop">
<
li><a href="#">{title}</a>
<
ul>{options}
<li id="{option}"><a href="#">{option_name} <div style="float: right; padding-right: 5px;">{price}</div></a></li>
{/options}</ul>
</
li>
</
ul>
</
td>
<
input id="optionprice" type="hidden" name="item_options[options]" value="" /> 
Profile
 
 
Posted: 26 July 2010 02:18 PM   [ Ignore ]   [ # 17 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

You’ll need javascript to take the selected value from your list element and shove it in the hidden field.

Change your LI a bit and take the + out of my js call below… added so that the board won’t change the thing to “[removed]”:

<li ><a href="java+script:void(0);" id="{option}" class="selectme">{option_name} <div style="float: right; padding-right: 5px;">{price}</div></a></li

Then you can use some jquery to take the selected item, and update the hidden input.

jQuery(document).ready(function($){
    
$(".selectme").click(function(){
        
$("#optionprice").val($(this).attr("id")); 
        return 
false
    
});

}); 
 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 26 July 2010 03:38 PM   [ Ignore ]   [ # 18 ]
Has a Nice Profile
Avatar
RankRank
Total Posts:  173
Joined  2010-04-08

getting oh so close—but - its still not allowing me to “select’ an option—can you peek at my code if you have a min?
I’ll PM you the page if you don’t mind.

Profile
 
 
   
2 of 2
2