[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Advice on how to make sure end user knows they must select from a list

Posted on 2010-11-19
3
Medium Priority
?
359 Views
Last Modified: 2012-05-10
Hi Experts,

I have an autocomplete function which brings back an array of iID and values.
The values are displayed to the user.
When selected the corresponding ID is stored in a hidden field.

I need to enforce the rule that if the user doesn't choose from the list (ie ID hasn't been set) then
they cannot carry on.  However, as the ID field is hidden, I am having trouble trying to come up with an elegant way of displaying this to the user.

Just after some advice on how you would tackle this problem!

Thanks
0
Comment
Question by:jagku
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 1500 total points
ID: 34172404
$("#formID").submit(function(e) {
     if( $("#listID").attr("selectedIndex") == 0 ) {
           e.preventDefault();
           alert("select something in the list!");
     }
});
0
 

Author Comment

by:jagku
ID: 34256258
Hi,

Apologies for the delay - I will take a look at this solution in the next fortnight and will come back to you.

Thanks
0
 

Author Closing Comment

by:jagku
ID: 34267086
Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question