struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour <>
Subject Re: ajax - Submit a form
Date Mon, 21 May 2007 20:46:58 GMT
No, I can not see any thing logged. Here' the whole JSP. it should give 
you an idea about what I am doing. I am trying to save/update an account 
and run a JS to disable the inputs.

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri=""%>
<%@ taglib uri="" prefix="display"%>

<s:head theme="ajax" debug="true"></s:head>

<script type="text/javascript">
function disableInputs(flag)
if (flag == 'null') flag = true;
var inputs = document.getElementById("data_table");
inputs = inputs.getElementsByTagName('input');
for ( i = 0 ;i < inputs.length ; i++ )
    inputs[i].disabled = flag ;

function showMessage(){
    alert('test message!');

<!-- show the account details -->

<table id="data_table" >
    <s:form id="MyData" action="/updateAccount.action"   >
            <td><s:label value="AccId:" /></td>
            <td><s:property value="" />
            <s:hidden name=""    value="${}" id="" /></td>

            <td><s:label value="First Name" /></td>
            <td><s:textfield name="acc.firstName" disabled="true"
                value="${acc.firstName}" /></td>
            <td><s:label value="Last Name: " /></td>
            <td><s:textfield name="acc.lastName" disabled="true"
                value="%{acc.lastName}" /></td>
        <s:submit  href="/updateAccount.action" 
                value="Save from inside the form w/o ajax"    > 


<hr />

<script type="text/javascript" language="javascript">
dojo.event.topic.subscribe("/disableAll" , function(data, type, request) {

        <td><s:a href="javascript://" 
        <td><s:url id="ajaxSubmit" value="/updateAccount.action" ></s:url>
        <s:submit  href="%{ajaxSubmit}"   notifyTopics="/disableAll"
            theme="ajax" formId="MyData" > save </s:submit>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message