This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jquery and Autocomplete

 
Rendi Artha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
basically I'm new in Jquery, so need advice from all expert here.
I just come to http://jqueryui.com/demos/autocomplete/#custom-data and try to change data.





I realize that label and description is mandatory so that i cant change with my own schema data.
Any tips or suggestion to make it working?

Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64830
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
satriana visi wrote:I realize that label and description is mandatory so that i cant change with my own schema data.

Why not?
 
Rendi Artha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
satriana visi wrote:I realize that label and description is mandatory so that i cant change with my own schema data.

Why not?


Previously in demo :


and I change to


of course i also make arrangement such this


fortunately if won't work as demo. Any missing Bear?

PS : somehow i make double post.please for delete new post.thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64830
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The widget expects a certain construct. You cant just go changing that structure. Why do you feel a need to change the property names? Youcan set the data to whatever you want.
 
Rendi Artha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:The widget expects a certain construct. You cant just go changing that structure. Why do you feel a need to change the property names? Youcan set the data to whatever you want.


on purpose flexible handling JSON data from server. Every response from server is different format, thats way as starter I try change property names.o
I dont know about widget,if you mean the widget is



as stated in .data() , .append() I already make arrangement. Is it correct way Bear?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic