Jump to content

Recommended Posts

Posted

Hi .. for the last time - i used to disable the browser Button (desktop and mobile) following script in mainform - but now  it didnt work anymore.. (chrome version 131..)

window.addEventListener('load', function() {
  window.history.pushState({ noBackExitsApp: true }, '')
})

window.addEventListener('popstate', function(event) {
  if (event.state && event.state.noBackExitsApp) {
    window.ajaxRequest (MainForm.form, "Test", []);
    window.history.pushState({ noBackExitsApp: true }, '')
  }
})

has anyone a working solution?

 

ThanX

Erich

 

 

Posted

.. ok .. found a working solution with  GPT-4o  😉 

 

window.history.pushState(null, '', window.location.href);

window.addEventListener('popstate', function (event) {
window.history.pushState(null, '', window.location.href);
window.ajaxRequest (MainForm.form, "Test", []); 
});

 

 

 

  • Like 1
Posted
2 hours ago, erich.wanker said:

.. ok .. found a working solution with  GPT-4o  😉 

 

window.history.pushState(null, '', window.location.href);

window.addEventListener('popstate', function (event) {
window.history.pushState(null, '', window.location.href);
window.ajaxRequest (MainForm.form, "Test", []); 
});

 

 

 

U-GPT (Unigui - GPT) :)

 

 

 

 

  • Happy 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...