Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Why OnClientClick is not calling javascript alert in sharepoint application page ?

$
0
0

Hello,

In aspx page I have set following code for button :

<asp:ButtonID="btnDelete"runat="server" OnClientClick="if (!ValidateSearch()) { return false;};"

                              OnClick="btnDelete_Click"     Text="Delete"></asp:Button>

 

In script I did as follow :

<scripttype="text/javascript">

        function ValidateSearch() {

             alert("Its working now :)");

            var flag = true;

            // JavaScript code for validation

            return flag;

         }

    </script>

 

Same is working and give alert if I click on delete button in asp.net web project , while its not working in SharePoint application page hosted in layout folder through VS 2010 in my project !!!!

Would you please let me know what can be the issue ?


Dipti Chhatrapati


Viewing all articles
Browse latest Browse all 11508


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>