Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
JavaScript
display: function (data) {
                 var Customer_No = data.record.CustomerNo;
                 var client_Name = data.record.ClientName;
                 $schemaEditor = $('<span>Edit</span>');
                 $schemaEditor.click(function () {
                     var currentId = $(this).data('Customer_No');
                     var data;
                     $.ajax({
                         url: _app.ApplicationURL.BaseURL + "Apps/CSTBibleMaster/Index",
                         type: 'GET',
                         dataType: 'html',
                         data: { CustomerNo: Customer_No, ClientName: client_Name },
                         success: function (data) {
                             ShowValidationMessages(data, 'Bible Master History', 1000, 400);
                         }
                     });
                 });
                 return $schemaEditor;
             }
         }


In the above code how to pass the data in string format

What I have tried:

pass the data in string format
Posted
Updated 23-Jan-17 0:16am
v3
Comments
dan!sh 23-Jan-17 4:29am    
Can you alter server side code as well? If yes, you can alter the API(?) call to accept parameters from URL itself since this is a Get operation
Why you need to pass in string?
Afzaal Ahmad Zeeshan 23-Jan-17 5:47am    
Did you try to serialize the object itself to JSON? Then pass that JSON object to the server.

1 solution

Check this out on how to turn the data into an JSON string How to write JSON data in ajax[^].
 
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