I’m trying to build a simple GAE application that would read a textbox, pass its contents to a Java method, and write its results to a specific DIV.
I know the very basics of HTML and web concepts (CSS, DOM etc.), but I lack practical experience in this field.
How do I hook up the text field to the input of the method, and the DIV to its output?
Basically you need to create an ajax request to the server passing the contents of the textbox as a parameter and returning the results, and then when you get the results set the contents of the div to what was returned.
look at the
jquery.get()method for the client side code. You’ll need to define the success method as a function which will set the contents of the div with the returned data. something along these lines:you don’t say what technology you are using server side, but basically you need the url you hit to return the data you need, and this should append whatever is returned to the div, so returning a html fragment should be what you want to do.