• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A very trivial question regarding Fom submission.

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am familiar with the concept that when a form is submitted say to a servlet the value of the text field is available by name to the servlet.
So for example

The servlet can access the value by


Now I know that in java script something like


This statement however sets the runtime value of the textbox and does'nt Adjust the original HTML (ie it doesnt add the typed data in the textbox in the value section).
However the typed text is still available to the servlet why is that ? does the submit button actually insert the content of textboxes in the value fields??

 
Sheriff
Posts: 67746
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
The HTML is just the source. Once the DOM has been created, the elements in the DOM are all that matter. So no, the value attributes are never changed, but it doesn't matter.

It's pretty much like asking if assigning a new value to a Java variable at run-time changes the source code of the Java class.
 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah thanks for clearing that up
reply
    Bookmark Topic Watch Topic
  • New Topic