Julie - See attached. I've learned a lot about JavaScript since writing this code, and looking back on it now I'm pretty embarrassed. I'm not doing things the right way, and I'm a little surprised this works at all! But it does work, so I hope it's helpful to you. (don't worry about about all the IU logos... they're just placeholders)
<p>TomG - Thanks again for your help. Just that little bit gave me enough to get started. I've spent around 50 hours this week on just the opening page of my survey, but I've learned a ton about JavaScript, variables, objects, jQuery, etc. I did a lot more than this lookup table, but that is what got me rolling and made me want to do a lot more along the way.</p> <p>For future readers, below is a little bit of what I did. I know it isn't perfect, but I couldn't have explained this last week (much less written it), so I'm pretty pleased. Of course, I'm very open to suggested improvements.</p> <p>First, I store the data table as an object. Below is an example of tbljsLeagues, but there were actually multiple data tables (I was getting cocky).</p> <pre><code> var tbljsLeagues = { lgID_001: { lgID:1, lgSport:"American football", lgSlug:"s_m_afb_ncaad1a", lgHasProRel:false}, lgID_002: { lgID:2, lgSport:"Ice hockey", lgSlug:"s_m_hok_nhl",
Thanks! I haven't used that command before, so I'll read up on it. (I first used jQuery when doing coding for a different Qualtrics survey a month ago. That's how ignorant I am about JavaScript. But, thanks to your help now, I'm improving quickly!)
Thank you for the incredibly quick reply! This idea seems simple enough (after I did some reading and learned about for... in loops), so I'll give it a try when I get back to the survey building. Thanks again!
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.