html:
<form id="myform">
   <input id="inputfield" name="view">
</form>
js:
var inputdata = $('#inputfield').val('ocean-view');
$('#myform').submit(function(e) {
    e.preventDefault();
    $.ajax({
       type: 'GET',
       url: 'http://serverB.com/detail.php',
       data: inputdata,
       dataType: 'jsonp'
    });
});
php:
<?php
    $view = $_GET['callback'].'('.json_encode(name) .')';
?>
html:
<h4><?php echo $view; ?></h4>
what the code does is:
from serverA, assign a value "ocean-view" to an input field, submit this form to serverB, and display this value in a h4 tag.
I couldn't quite figure out how to write the server-side code to output the value, even though I have found the following posts.
Any kind of help is appreciated.
UPDATE: I used YQL to help to see the jsonp callback response, here is the json structure:
callback({
  "query": {
    "count": 1,
    "created": "2013-07-29T13:01:12Z",
    "lang": "en-US",
    "results": {
       "h3": {
         "class": "mytitle",
         "content": "Example"
       }
    }
  }
});
 
     
     
    