hi,
im new to struts2..in my application i need to use that Struts2 concept..im developing jsp page..i had designed..drop-down box in jsp..if im doing validation it is not getting..and it is not getting validated..can any one help me out..
login.jsp
Also, when posting in the HTML/JavaScript forum, please show only the rendered HTML--JSP is useless to us. You may find that looking at the rendered HTML is enough to solve your problem. Plus your JavaScript is wrong anyway, unless you really want a user to be able to select the header label as a legal value.
I think you misunderstood what I meant when I said "post the rendered HTML". You just posted more *more* JSP, which is kind of the opposite of what is useful.
Wouldn't it be cleaner to use a regex for the textfield validation? Or at least refactor out the validation code into its own method?
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
hi,
i tried this way for validation of combo box but im getting validated..here is the code.
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
hi good morning,
i m unable to do validation for select statement..i tried so many times..but im not getting ..here is the code..can any one help me out.
Works fine for me. I still think you should use a regex for that file thing though.
How will you be uploading the file without a file input?
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
hi David,
i tried to validate 'combobox' in normal jsp page it is working fine but not it in Struts2.You told it is working fine for you..my code is working fine for you and why not for me?have you done any changes..if so can you provide me the solution.
I don't see how this is significantly different. Did you put a breakpoint or alert or console log to see if it's even getting to the code that validates the select?
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
posted
0
i checked..till 'TextFile'..it is getting validated..and it is not getting validated for combo box..for Struts2 is there any other way for client side validation for Select statement
David Newton wrote:I don't see how this is significantly different. Did you put a breakpoint or alert or console log to see if it's even getting to the code that validates the select?