Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
confirm() function is not working in Chrome & FireFox || document.depositNotifInfoForm deprecated

In a legacy java struts application, this code in the jsp page is working fine on Internet Explorer but not working in the Chrome & FireFox.

<a id="alertSubmit" class="button" href="#" onkeypress="" onclick="javascript:this.blur();depositNotifSubmit();">
<span>
<bean-el:message bundle="${terms}" key="label.submit"/>
</span>

<script language="javascript" type="text/javascript">

var isSubmit = false;
function depositNotifSubmit()
{
  if (validateFields()) {
if(!isSubmit){
   isSubmit = true;
   doConfirmSubmitAction(document.depositNotifInfoForm, 'depositNotifInput.recip',
'<bean-el:message bundle="${terms}" key="popup.message.continue" />');
    }
}
}

function doConfirmSubmitAction(formObj, action, message)
{
  //if (formObj == null) formObj = document.generalSubmit;
  if (action != null && action != "")
    formObj.action = action;
  if (confirm(message)){
 formObj.submit();
  }else{
 isSubmit = false;
  }
} 

Expected result (working fine on Internet Explorer) :- After hitting the SUBMIT button it should prompt up a confirm box & if 'Yes' is selected, then update the changes that is written in the code not provided here.

Actual result :- Working fine in Internet Explorer, showing the confirm pp-up & pressed 'Yes' updating the values. But on Chrome & FireFox, after hitting submit, nor confirm pop-up is showing nor the values are getting updated.

Any help to get this code/scenario working on Chrome and Firefox would be appreciated. Find the actual screen-shots for the reference.

After getting the suggestion that document.depositNotifInfoForm has been deprecated & to check the browser console for the error. Attaching the screen shot of the console error for the reference.

Console error :-

depositNotifInfo.recip:1034 Uncaught TypeError: Cannot read properties of null (reading 'value')
    at validateFields (depositNotifInfo.recip:1034:64)
    at depositNotifSubmit (depositNotifInfo.recip:980:9)
    at HTMLAnchorElement.onclick (depositNotifInfo.recip:963:147)
validateFields @ depositNotifInfo.recip:1034
depositNotifSubmit @ depositNotifInfo.recip:980
onclick @ depositNotifInfo.recip:963

Browser console error screen-shot

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!