JS onSave event is not working in Microsoft Edge. what are the alternatives for it?

69 Views Asked by At

I'm working in correcting js code to be compatible with Micorosoft Edge. I have a problem with <onLoad> and <onSave> events which were working well with Internet Explorer, but not with Ms Edge. I've read that <onSave> is obsolete (https://learn.microsoft.com/en-us/previous-versions/ms531412(v=vs.85)). I wanted to know what re the alternatives for these events ?

.Ascx Page

<div id="divMenu" onchange ="saveState()" onLoad ="loadState()" class="saveHistory" style="display:none;></div>

js file

function loadState(){**Code**}
function saveState(){**Code**}

Thank you in advance :)

I ve found a way to execute onLoad() function by adding this in ascx page but not for onSave(). Is there any alternative for onSave() ?

 <script type="text/javascript">
        window.onload = loadState('divMenu');
  </script>
0

There are 0 best solutions below