Hi Musachy,

Thanks for replying!

On FB I see HTTP 404s on:
1) http://localhost:8080/validations/stuts/dojo/src/widget/html/Tooltip.js
2) http://localhost:8080/validations/stuts/dojo/src/widget/html.js
3) http://localhost:8080/validations/stuts/dojo/src/widget.js
4) http://localhost:8080/validations/stuts/dojo/src/__package__.js
5) http://localhost:8080/validations/stuts/dojo/src.js
6) http://localhost:8080/validations/stuts/dojo/__package__.js

Also, on both FB and the page, I see the error:
Could not load 'dojo.widget.html.Tooltip'; last tried '__package__.js'
(I have enabled Dojo debug now). I think the Dojo widget is called
dojo.widget.Tooltip.

When the form first shows up I see the field error message for 'name' field.
When I fill out the field and tab out of it, no AJAX request is send to the
server (I am assuming that the expectation is that the form gets validated
at the server via an AJAX call onBlur).

When I click submit, an AJAX request is send and the server responds with
the HTML page for the action; but nothing happens to the page.

Here is the source of the page that is loaded into the browser when the form
is first shown:
<html>
<head>
<title>Testing Validations</title>
<link rel="stylesheet" href="/validations/struts/xhtml/styles.css"
type="text/css"/>
<script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
        baseRelativePath: "/validations/struts/dojo",
        isDebug: true,
        bindEncoding: "UTF-8",
        debugAtAllCosts: true // not needed, but allows the Venkman debugger
to work with the includes
    };
</script>
<script language="JavaScript" type="text/javascript"
        src="/validations/struts/dojo/dojo.js"></script>
<script language="JavaScript" type="text/javascript"
        src="/validations/struts/simple/dojoRequire.js"></script>
<script language="JavaScript" type="text/javascript"
        src="/validations/struts/ajax/dojoRequire.js"></script>
<script language="JavaScript" type="text/javascript"
        src="/validations/struts/CommonFunctions.js"></script>

</head>

<body>

<form namespace="" id="show" action="show.action" 
>
<table class="wwFormTable">
        <tr errorFor="show_name">
    <td align="center" valign="top" colspan="2"><span
class="errorMessage">Name cannot be empty</span></td>
</tr>
<tr>
    <td class="tdLabel"><label for="show_name"
class="errorLabel">Name:</label></td>
    <td
><input type="text" name="name" value="" id="show_name"/>

</td>
</tr>

        <tr>
    <td class="tdLabel"><label for="show_age"
class="label">Age:</label></td>
    <td
><input type="text" name="age" value="0" id="show_age"/>
</td>
</tr>

        <tr>
    <td colspan="2"><div align="right">    <input type="submit"
dojoType="struts:Bind" event="onclick"     value="Submit"  
        id="show_0"  />

</div></td>
</tr>


<!-- javascript that is needed for tooltips -->
<script language="JavaScript"
type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>

</table>
</form>


</body>
</html>

Thanks,
Binil


Musachy Barroso wrote:
> 
> Enable dojo debugging by setting debug="true" on the head tag, and see if
> there are any errors. Can you post the errors that you are seeing in FB?
> 

-- 
View this message in context: 
http://www.nabble.com/Getting-the-AJAX-Form-Validations-to-work-tf3390223.html#a9437856
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to