• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

how to populate form fields with response from xmlhttprequest  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i found a difficult to populate two tag html like(<select> and <input type="text") on getting response on the same time with response of xmlhttprequest from response of servlet java and integrate style css and event javascript? please suggest me a response
 
Ranch Hand
Posts: 207
2
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you have to parse the data, then build the Dom elements with JavaScript.  Probably easier to use jQuery for that.
 
Sheriff
Posts: 23644
48
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parsing the data could be the hard part, so it would be best to make the format of the data returned from the servlet be as easy as possible to parse.
 
Author and ninkuma
Marshal
Posts: 66787
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Populating form field values won't involve DOM manipulation, but everything in the browser is easier with jQuery.
 
Al Hobbs
Ranch Hand
Posts: 207
2
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Populating form field values won't involve DOM manipulation.


Why is it not considered Dom manipulation? Wouldn't she have to at least add something to existing html?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66787
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Al Hobbs wrote:

Bear Bibeault wrote:Populating form field values won't involve DOM manipulation.


Why is it not considered Dom manipulation? Wouldn't she have to at least add something to existing html?


No. Setting the value of an existing form field makes no changes to the DOM, just to the attributes of existing DOM elements.

Now, if instead, she needed to create the form elements from scratch, then that would require DOM manipulations, but that doesn't sound like what she needs.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!