Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

I am trying to make a mobile application in Phonegap and Jquerymobile (as UI) but i m completely noob at javascript i am trying to call a wcf service(access sql database via linq to sql class)in Phonegap.My Service is running fine but the mobile part is creating some problems Here's my service-
XML
[ServiceContract]

   public interface IService1
   {

       [OperationContract]
       [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json)]

       List<My_Employee> FindEmployee(string uid);


and Jquerymobile UI in Index.html file of Cordova(Phonegap)-

XML
<div data-role="page"  id="one" data-theme="a">
        <div data-role="header" data-theme="b" >
          <h1>EmpFinder</h1>
        </div>
          <!--head finishes here-->
          <div data-role="fieldcontain">
            <label for="name">EmpId:</label>
            <input type="text" name="name" id="empid" value=""  />
          </div>
          <!--Text input finishes here-->

          <div>
            <p>
              <input type="submit" id="requestdata" value="Submit" data-theme="b" />
            </p>
          </div>
     </div>


user will Write the empId in text input and Employee's Full name along with his/her Phoneno. will be displayed.
Please tell me how should i start with calling the service on button click event.
Sorry if the Question irritates you but i really need to find an answer to this.
I'm Using VS2010 Professional for writing Web Service and My Phonegap's Version is 2.1.0
Any Suggestions are Welcome.
Thanks for reading this.
Have a nice day ahead..
Posted

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