Explore the community Forums Lectora Lectora Questions & Answers Use variable in text for droplist Reply To: Use variable in text for droplist

#370822 Score: 0
Profile photo of Jason Dalrymple
Jason Dalrymple
Member
beginner
intermediate
profile
wise owl
curious george
contributor
friend finder
advanced
picture perfect
54 pts
@JasonADal

With a little more research, I got it! It was just a matter of learning how to add the element id and whether it needed ‘id’ on the end of the element or not. From there, it was just remembering that I needed the # in front of it, and viola:

$(‘#combo258138 option:nth-child(2)’).attr(‘value’,VarVariable1.getValue()).text(VarVariable1.getValue());

Thanks again for all your help and pushing me at least baby steps into the world of JS and jquery.