Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am no PERL developer, but I got on a project where such knowledge is needed and someone needs to do the research. This function is seemingly not working with IE or Chrome either - incompatibility issue? The warning within the code does not show up anymore. Code looks something like this, kindly asking for support on the matter, if available. Thank you :

<script language=Javascript> function NSAG_onBodyUnload() { NSAG_OnUnload(); //; } … function NSAG_OnUnload() { var e = window.event; if(e.clientY < 0) { if(NSAG_IsValuesChanged() == true) { //var message = 'ACHTUNG!\n'; //message += 'Die Daten wurden noch nicht gespeichert!\n'; //message += 'Sind Sie sicher, dass Sie die Seite verlassen wo +llen ohne die Daten zu speichern?\n\n'; var messageT = ''; var message = 'ATTENTION!\n'; message += 'The data has not been saved!\n'; message += 'Are you sure that you would like to leave the site + without saving the modifications?\n\n'; messageT = 'ATTENTION!\nThe +data has not been saved!\nAre you sure that you would like to leave t +he site without saving the modifications?'; var o_Text = document.get +ElementsByName('NSAG_MSG_CLOSE_TICKET'); if((o_Text != null) && (o_Text[0] != null)) { message = o_Text.text; } if(messageT.length > 0) message = messageT; if(typeof evt == 'undefined') { evt = window.event; } if(evt) { evt.returnValue = message; } return message; } } } </script> <BODY class="tightPage" onload="onBodyLoad()" onunload="" onBe +foreUnload="NSAG_onBodyUnload()" > <!-- screenID: MRTicketPage-pb-4 --> <div id="ContentWrapper" class="MinWidth" > <div> <style type="text/css">

Replies are listed 'Best First'.
Re: [OT] SUBS/NSAG_TicketPage_Cancel_Check.pl function not working
by Eily (Monsignor) on Nov 27, 2017 at 10:04 UTC

    Hello. Although the file you are working on is a perl file, the section of code that you have provided is javascript instead (you can see at the top that it's a script section, written in javascript). The perl part is what the server will execute to create the page, and the javascript part is sent in the content to be executed by the browser (IE, Chrome...).

    So this is not the right place for this question, maybe you can try Stack Overflow instead.

      Thank you, will do!