<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Test API</title> <script src="Script/jquery-1.2.6.js" type="text/javascript"></script> <script src="Script/jquery-1.2.6-vsdoc.js" type="text/javascript"></script> <script type="text/javascript"> document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { } $(document).ready(function () { //button click function $('#Button1').click(function () { alert("success"); //var appid=$("#appid").val(); var p1 = $("#p1").val(); $.ajax({ type: 'POST', url: "https://mindapp-pulpy.rhcloud.com/AuthXmlPulpy", data: { appid: 'MPAPP_0028', p1: p1 }, dataType: "xml", success: function (data) { alert("Sucess"); $(data).find("root").each(function () { a = $(this).find("a").text(); b = $(this).find("b").text(); //c=$(this).find("c").text(); // $.mobile.changePage('#page2'); window.location.href = "#Default.aspx"; $("#result").append('<li><b>Artist:</b>' + ' ' + a + '<br>Album:' + ' ' + b + '</li><br>'); $("#result").listview("refresh"); }); } }); //ajax ends }); //click function ends //$("form")[0].reset(); $("#Default.aspx #result").empty(); }); //document ends </script> </head> <body> <form id="form1" runat="server"> <h4 class="temp2">Test App</h4> <input type="text" id="p1" name="p1" class="user-text1 textboxes" /> </div> <asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" style="width: 61px" /><br /> <asp:ListBox ID="result" runat="server" Height="113px" Width="185px" SelectionMode="Multiple"> </asp:ListBox> </div> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)