Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Removing Value of Select With FormAPI
Tim__D
Hi,
I'm populating a <select> using a callout. My problem is that when the user action returns no results the rest of the script fails. What I want to have happen is that based on some user action 0 or more results are returned. When 0 results are returned the select box is hidden. When one or more results are returned the select box is shown and populated. How do I safely remove all the options in a <select> item rendering the value "" without breaking the API?
- Tim
Find more posts tagged with
Comments
jbonifaci
Why don't you just hide the item? Also, RTFM on setOptions. If neither of those apply, I guess I don't understand what you are trying to do, please explain a little more clearly and/or post your code you are having problems with.
~Jeff