I have editable dropdown list box on jquery grid, if I am not selecting the dropdown list box item I need to give a messagebox to the user saying please select..
How do I do this using jquery?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ok, I think I get what you mean, but I’m not sure you really need to do what you’re suggesting!
A select menu will always have something selected, usually the first option by default. Also, you can only give the user some sort of prompt once they have tried to submit the form otherwise you’d get an alert everytime the page loaded – not very user friendly.
Does that make sense?
The easiest way to make sure your users select something manually is to give the first option in the list a value of something like “Please choose…” and then every subsequent option a value which is valid for whatever it is they are selecting.
That way, when the user submits the form (this can be done automatically when a new option is selected if you wish) you simply need a quick check to see that the value selected isn’t “Please choose…”. If it is, then give them some sort of alert – either a popup (yuk!) or do it with some nice, styled, html.
I’ve never used the jqGrid plugin, but I hope the above helps you to figure it out!