Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda