Click here to Skip to main content
16,008,942 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends,
Can we have something like this?
function funDelete() {
           if (confirm("Do you want to delete this record?")) {
               try {
                   var id = document.getElementById("ctl00_cphMain_gvJobs_ctl05_hfID").value;
                                       //TRY TO DELETE RECORD USING JSON
                   $.ajax({
                           //CODE TO DELETE RECORD
               });
               }
               catch (e) {
                   alert("Error:" + e.message);
               }
           }
       }


When I try to do, it gives error saying '$. not defined'

Any idea, how can I use $.ajax part in such situation???

Thanks in advance
Posted
Updated 1-Jul-11 19:57pm
v2

1 solution

Have you included the JSON libraries ? JSON is a javascript library, so there's no reason you can't use it in a web page.http://www.json.org/[^] has the JSON library for javascript available for download.
 
Share this answer
 
Comments
dhage.prashant01 2-Jul-11 2:01am    
Json library?
I have made use of json through, ajax with jquery

so why ned of library?

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