This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Post addtional data from Javascipt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Post addtional data from Javascipt" Watch "Post addtional data from Javascipt" New topic

Post addtional data from Javascipt

Joe Brigs
Ranch Hand

Joined: Jun 06, 2011
Posts: 70

I'm looking for the best way to do the following: I have a Data Entry Form that I'm validating thru Javascript. I want to Post a Value thats not part of the form depending on the results of an edit. ( i.e. if A == B post 3 else post 4 ) Is this as simple as defining a "Hidden" field on the form and setting it to the result of the if statement ? or is there a better way ? Thanks

As a side question, is there a good site or book that I could read about Forms specifically. I'm coding a pure Data Entry Application , thats writing data to a Database, And I'm finding some of the books I've read about HTML & Javascript dont talk about forms enough.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63540

I'd use a hidden input.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Post addtional data from Javascipt
It's not a secret anymore!