Announcement Announcement Module
Collapse
No announcement yet.
Doubt in Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Doubt in

    Hi All,

    I m new to this springframwork. In one of the project we r implementing this framework. This project is half way developed and i have to continue with that. In one situation i need to assign a property based on the button which is clicked by the user. In the project they have used the following code

    <spring:bind path="command.buttonPressed">
    <INPUT type="hidden" name="buttonPressed" id="buttonPressed">
    </spring:bind>

    <TABLE width="100%">
    <TR>
    <TD align=center>

    <INPUT class="buttonstyle" type="button" name="Submit" value="Submit" onClick="<c:out value="validate('${formname}', 'SUBMIT')"/>">

    <INPUT class="buttonstyle" type="button" name="Save" value="Save & Close" onClick="<c:out value="submitForm('${formname}','SAVE')"/>">

    <TD>
    </TR>
    </TABLE>

    JavaScirpt function:

    function validate(formName, button) {
    document.all["buttonPressed"].value=button;
    }

    function submitForm(formName,fieldVal) {
    document.all["buttonPressed"].value=fieldVal;
    document.forms[formName].submit();
    }

    In this when user presses the submit button. i need to assign the value of the property buttonPressed.

    But sometimes when i click the submit button it works properly but most of the time it is not assigning the value of the button in the property field. i couldnt find the reason.

    I think u could understand my question. One more problem is i have very short time to finish this module. pls help me as soon as possible. Thanx for ur answers.

    Thanx & Regards
    Raja
Working...
X