Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Access-Control-Allow-Origin: *");
- $hint="";
- $itemName=$_GET["itemName"];
- if($itemName == "ipad")
- $hint = "Apple Ipad";
- if($itemName == "nexus")
- $hint = "Google Nexus";
- if($itemName == "motog")
- $hint = "Moto g";
- if($itemName == "xperiap")
- $hint = "Sony Xperia P";
- echo $hint==="" ? "No Details" : $hint;
- ?>
- function getDetails(itemName){
- request = createRequest();
- if(request == null){
- alert("Connection isuses");
- return false;
- }
- document.domain = document.domain;
- var url = "http://"+document.domain+"/Ajax/getDetails.php?itemName="+itemName;
- request.onreadystatechange = displayDetails;
- request.open("GET", url,true);
- request.send();
- }
- chrome.exe --disable-web-security
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement