Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
1.50/5 (3 votes)
See more:
C#
<form id="form1" runat="server" onsubmit="fun('postback',event)">


C#
<script type="text/javascript">

           function fun(data, event) {
               if (data == "postback") {
               
                   window.onbeforeunload = function () { }
//                   window.form1.submit();
               }
               else if (data == "notpostback") {
                   if (aClick == "false") {
                       ajaxCall();
                       alert("Logged Out");
                       return true;
                   }
               }
           }
      
    </script>



This is working fine with chrome but button click not working in firefox.

plz help me,
Posted
Updated 29-Sep-13 20:27pm
v5

1 solution

Try is as below.

XML
<form id="form1" runat="server">

<button type="submit" class='input_submit' onClick="fun('postback')">Save</button>

</form>


I hope this will help to you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900