• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

how to populate form fields with response from xmlhttprequest  RSS feed

 
Greenhorn
Posts: 22
  • 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: 23714
50
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: 66823
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: 66823
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!