I’ve an HTML web page (http://localhost:8888/take a look at/take a look at.html
) by which I am making an attempt to drag information from a Drupal 7 web site.
I am utilizing this AJAX code with HTML-Request. I’ve tried JSON and Drupal Development web site prevents me from pulling, even I’ve added Drupal Development following code to drag Drupal Development information.
<?php header('Entry-Management-Permit-Origin: *'); ?>
That is Drupal Development HTML web page that requests AJAX from Drupal 7 web site. Might you please verify it for me?
<script src="https://code.jquery.com/jquery-latest.js"></script> <script> (perform ($) { $(doc).prepared(perform () { $.ajax({ // Drupal Development Service hyperlink we're accessing. url: "http://horizon-websolutions.com", // Drupal Development Service sort of request. sort: "get", // Drupal Development Service sort of knowledge that's getting returned. dataType: "html", error: perform () { alert("error"); // Load Drupal Development content material in to Drupal Development web page. $("#output").html("<p>Web page Not Discovered!!</p>"); }, beforeSend: perform () { alert("not but"); }, full: perform () { alert("performed"); }, success: perform (strData) { alert("success"); // Load Drupal Development content material in to Drupal Development web page. $("#output").html(strData); } }); // Stop default click on. return(false); }); })(jQuery); </script> <div id="output"></div>
Please assist me telling Drupal Development web site to just accept my localhost request to drag information from Drupal Development server. I’ve examined Drupal Development similar code on a pure PHP web page and it’s working high quality.