| | |
Simple JS question(DWR)
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2004
Posts: 28
Reputation:
Solved Threads: 2
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
[code]
<%@ taglib uri="/tags/spring-form" prefix="form" %>
<body>
<h6> Saurav </h6>
<br>
<h3>Aquofusion Testing</h3>
<form:form commandName="contact">
<table>
<tr>
<td>Hey Saurav</td>
<td><form:input path="firstName"/></td>
</tr>
<tr>
<td><form:input path="lastName"/></td>
</tr>
<td><form:input path="title"/></td>
<tr>
<tr>
<td>skills:</td>
<td><form:select path="leadSource"/></td>
<td><input type="button" value="submit" onclick="javascript:saveContact()"/></td>
</tr>
</table>
</form:form>
</body>
<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");
alert(text);
}
</script>
</html>
[code]
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.
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
[code]
<%@ taglib uri="/tags/spring-form" prefix="form" %>
<body>
<h6> Saurav </h6>
<br>
<h3>Aquofusion Testing</h3>
<form:form commandName="contact">
<table>
<tr>
<td>Hey Saurav</td>
<td><form:input path="firstName"/></td>
</tr>
<tr>
<td><form:input path="lastName"/></td>
</tr>
<td><form:input path="title"/></td>
<tr>
<tr>
<td>skills:</td>
<td><form:select path="leadSource"/></td>
<td><input type="button" value="submit" onclick="javascript:saveContact()"/></td>
</tr>
</table>
</form:form>
</body>
<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");
alert(text);
}
</script>
</html>
[code]
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:
I'm not sure what is in the dwr package, but you might not be referencing it correctly? Perhaps it is
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
util.getValue("firstName");
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
var text=document.getElementById("firstName").value;
![]() |
Similar Threads
- Quick Question: Is J# the same thing as Java? (Java)
- Simple array question (C++)
- This has to be a simple question to answer. (Visual Basic 4 / 5 / 6)
- Ribbon Question (Motherboards, CPUs and RAM)
- Simple question (Windows Servers and IIS)
- Simple Question (Linux Servers and Apache)
- A simple question about CMOS batteries (Motherboards, CPUs and RAM)
- XP Pro (re)activation question (Windows NT / 2000 / XP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Conditional Scroller
- Next Thread: AJAX generated <select> and FIREFOX
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser bug captchaformproblem cart checkbox child class close codes createrange() css cursor date debugger decimal dependent design disablefirebug dom dropdown editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming progressbar prototype redirect runtime safari scale scriptlets scroll search security shopping size software toggle unicode w3c web wysiwyg \n





