0

I want to check certain conditions by using a javascript function in a jsp page when the user submits the form. I am using struts2.

I tried the following:

<s:submit action="finalSubmitOfServices" value="Submit" onclick="return fnConfirmSubmit()" />

and the javascript is like..

function fnCheckPendingValue()
    {
          //code
    }

But its not working, I am not sure how to solve this, Would really appreciate someone's help.

Thanks.

1
  • 4
    you are calling a different javascript function. LOL. Commented Oct 24, 2013 at 20:31

1 Answer 1

3

First change your function name to fnConfirmSubmit() as Andrea Ligios said. And still if its not working write your function in onsubmit of form. Hope you got it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.