• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Form is not hitting controller when I function is meeting the condition on click

 
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following code for a form and javascript in a JSP. The problem I'm facing is as follows:

When I hit the save button, and if if(speciesid === 2){ condition is satisfied and I hit the "SAVE" button from the jquery dialog, it's not hitting the controller. However, whenever the if(speciesid === 2){
condition is not satisfied, it works fine and hits my controller.  I have some suspicion about this line "      document.getElementById("orderForm").submit();". Can anyone see any issue in my code?Other form fields have been omitted to avoid large code content





 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic