Hi All,

I have not got much expousre into JS.I have been trying to work
Ajax with Java through DWR.

I have a code like this

<%@ taglib uri="/tags/spring-form" prefix="form" %>

<h6> Saurav </h6>

<h3>Aquofusion Testing</h3>
<form:form commandName="contact">
    <td>Hey Saurav</td>
    <td><form:input path="firstName"/></td>
    <td><form:input path="lastName"/></td>
    <td><form:input path="title"/></td>
    <td><form:select path="leadSource"/></td>
    <td><input type="button" value="submit" onclick="javascript:saveContact()"/></td>


<script type="text/javascript" src="/servlet/dwr/util.js"></script>
<script type="text/javascript" src="/servlet/dwr/interface/Contact.js"></script>

<script langauge="JavaScript">

function callSaurav()
alert("hey saurav u r done man");

function saveContact()
    var text=dwr.util.getValue("firstName");

i am getting the error fo dwr not found.
Fair enough it cant the reference for dwr.
Please let me know how we can include the DWR.
I have set the necessary web.xml and dwr.xml.

Hi saurav!
I'm not sure what is in the dwr package, but you might not be referencing it correctly? Perhaps it is


? However you can do the same like this:

var text=document.getElementById("firstName").value;

But you'd need to put an ID on the for input fields - can you do this with JSP? I don't see why not?

But you may just have your naming wrong?