This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

load data automatically when mouse over the combobox

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello guys.. i am a beginner.. so i totally burr about tis.. so need yout help.. and if possible give me step by step..
the prob is..
I want to create a combo box which load its data automatically when user click the combo box. and the data is retrieve from database SQL, that means, once mouse over the combo box, it will call a function to load the data. If not, the combo box is remain empty.

thanks for any help.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would need to use AJAX for this.
Moving to the HTML/Javascript forum where AJAX is discussed.
 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That really is not a good idea.

It's going to take some time for the data to get read frm the database, so waiting until the user clicks on the select element (it's not a combobox) to try to go fetch its content is a very poor idea.
 
nad nadia
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
acctually... i just do whateva my boss need me to do...
actually our page sometimes have more than 30 drop down list in one page, so if every drop down request from database, its quite slow...
thanks for your advice, but i still need to do it,so, do know how to do it? thnaks
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Nad,

I understand your requirement and as suggested by Ben, AJAX would be the best solution. But, if you do not want to use AJAX, then why not try to sell the concept of Lookup screen?

i.e. instaead of dropdowns, provide the user with a text box. Let user enter some value, or the initial alphabet of the value he/she is looking to select. Provide a link next to your text box as 'Look up' and then based on the value entered by user, retrieve the results in a new screen. User can then select a value from the displayed ones.

This will serve 2 things,
1. user gets refined data - he/she can search
2. you do not need to populate all the drop downs
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic