Hi I am new on DNN. I have a api called. https://www.abc.com/getdata/1 and Inside of desktopmodule I have a simple ascx written asp.net and I want to create jquery ajax to call the API - https://www.abc.com/getdata/1
What do I need to do making it works in a simple DNN module?
Below is the js codes that I currently use for another HTML project. I hope I can copy over to DNN module
<script type="text/javascript"> function GetProductList() { var tr=''; var model = { 'Manufacturer_ID': 852 }; $.ajax({ type: "POST", url: "https://www.whatever.com/api/Product//ProductList?type=json", dataType: "json", contentType: "application/json;charset=utf-8", data: JSON.stringify(model), success: function (data) { //alert("HI"); $.each(data, function (index) { tr = tr + data[index].Product_ID + ":" + data[index].ProductName + '\n'; }); alert(tr); }, error: function (error) { alert("Error " + error); } }); } </script>
These Forums are dedicated to discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.