Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Got to trouble you guys again. Currently I am trying to pass javascript variables to a servlet or a bean file. I understand that javascript is client based and servlets are server based. But I have read up that there are ways to pass it. Anyone can show some examples on it?
The only way to get a value from the client to the server is to submit a request, and send that value as a request parameter.
Most often that is done by clicking a link / submitting a form.
With a link, you construct the URL with the parameter dynamically: eg
With submitting a form, you normally put a hidden field onto the page (<input type="hidden") and then submit the form.
A technique that is catching on is AJAX - where you make a javascript call to submit a request to the server without reloading the whole page. It still does a request/response, but it makes the page feel faster.
2. Call a javascript function when the submit button is clicked (onClick event). this javascript function should populate the hidden fields with the javascript variable values.
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)