0

I am new for PhoneGap

I want to develop my phonegap android application.

I have try to no of time but not become success so if have knowledge for "Access Web Service of PHP in JavaScript which will give response in Json"

If any one idea about how to handle (parse) web service response of Json String in java script???...

Please Help me...

asked May 1, 2012 at 10:15
1
  • why you want to handle this because it seems you want to do something with form post method Commented May 1, 2012 at 10:28

2 Answers 2

1

Please write down below Jquery code in your phonegap pages.

$(document).ready(function() {
 $("#submit").click(function(){
 var formData = $("#formId").serialize();
 $.ajax({
 data:formData,
 url: 'http://urlname.com/webapi.php',
 dataType: "jsonp",
 jsonpCallback: "onSuccess"
 });
 return false;
 });
 function onSuccess(data, status)
 {
 $("#divId").text($.trim(data.result));
 }
 }
answered Oct 23, 2015 at 6:21
0

Look at AJAX. To be honest, you've not given us much to go on as we don't know what you've already tried and what your experience is. Some examples of your previous attempts would be useful.

answered May 1, 2012 at 10:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.