So, 1 out of 10_000 times a page is used, they might need to change this variable. It should only have one of n allowed values, so I'm using a SELECT.
As a developer, the easiest way is to pull all the values it could be out of the database, pass them to the template, make them OPTIONs in the SELECT, and go from there.
It makes slightly more sense to make an AJAX thing and fill it after page load, so that the IO of getting that list out of the database won't delay the page any.
The coolest would be to trigger the filling of the SELECT when the user wants it, not on page load.
But I have the mechanism to make the first one go now, so I'll go with the first.
As a developer, the easiest way is to pull all the values it could be out of the database, pass them to the template, make them OPTIONs in the SELECT, and go from there.
It makes slightly more sense to make an AJAX thing and fill it after page load, so that the IO of getting that list out of the database won't delay the page any.
The coolest would be to trigger the filling of the SELECT when the user wants it, not on page load.
But I have the mechanism to make the first one go now, so I'll go with the first.
No comments:
Post a Comment