• 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
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

how to populate form fields with response from xmlhttprequest

 
Ranch Hand
Posts: 62
  • 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
 
Rancher
Posts: 506
6
IntelliJ IDE Spring Fedora
  • 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: 24716
59
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.
 
Marshal
Posts: 67313
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Rancher
Posts: 506
6
IntelliJ IDE Spring Fedora
  • 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
Marshal
Posts: 67313
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Good night. Drive safely. Here's a tiny ad for the road:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!