hello, i have asp.net project in that i take two script .In one i have added one jquery file and i want to take another script fuction only for display the message.. this is the code <script src="../jquery-1.2.6.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $("#<%=GridView1.ClientID%> input[id$='chkAll']:checkbox").click(function () { $("#<%=GridView1.ClientID%> input[id*='chkSelected']:checkbox").attr('checked', $(this).is(':checked')); }); }); </script> <script> fuction message() { alert({"Select one checkbox"); } </script> but when i run this one it will show me error...plz give me advise.
For starters you could copy the script that is already rendered inside the html source. And of course you could paste the exact error. Alternatively you could install firebug extension for FireFox and inspect the error yourself.
There is at least one error in the code. alert({"Select one checkbox"); Code (markup): there is a { before the quotes which does throw a error