cross-domain

Send XML String as Response

谁都会走 提交于 2019-12-19 11:48:30
问题 I am getting my Request from a third party application(different domain) to my ASP application. I am handling the request and doing the business part in my application and as a acknowledgement I need to send XML string as Response to the same Page which POSTED the request to my Application. I was successful in retrieving the input from Request using the following code NameValueCollection postPageCollection = Request.Form; foreach (string name in postPageCollection.AllKeys) { ... =

Implementing cross domain communication between sites through CORS using PHP and Javascript

丶灬走出姿态 提交于 2019-12-19 11:44:11
问题 After days of browsing on web and trying every possible thing, I came to know about there were issues with my host server. It was disabled by my host server. So, I thought of posting my code on Stackoverflow, so that , no one else on SO loses time as I did. The code snippet works perfectly fine on IE, Safari, Mozilla and Chrome. 回答1: Javascript Code for the client side <script type='text/javascript'> // function for making an object for making AJAX request function getXMLHTTPRequest() { try {

Symfony 2 Functional Testing external URL

别等时光非礼了梦想. 提交于 2019-12-19 11:31:11
问题 Whatever I do, I always get a Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for [...]" in $crawler->text() , when I try to request an external URL with $crawler = $client->request('GET', 'http://anotherdomain.com'); . I want to do that because I'm using another virtualHost to render some pages with Symfony 1.2 and some others with Symfony 2.3. I also tried to $client = static::createClient(array(), array('HTTP_HOST' => 'anotherdomain.com')); $client-

Cross Domain security error in Silverlight?

折月煮酒 提交于 2019-12-19 10:57:24
问题 I'm trying to read a feed from Yahoo Pipes into a Silverlight Application. I keep getting a SecurityException, which sounds like a cross domain policy problem, but Yahoo pipes, if you go through the pipes.yahooapis domain, has a cross domain policy, so should be ok. I tried the exact same code, but going to the Digg API, and it works fine (although this is rest rather than an rss feed). Could my error have nothing to do with Cross Domain policies? I use the following code for the web request

Changing DOM element order with CSS (Crocodoc) [duplicate]

萝らか妹 提交于 2019-12-19 10:48:28
问题 This question already has answers here : How can I reorder my divs using only CSS? (24 answers) Closed 4 months ago . Is it possible to change DOM element order with CSS? I have an iframe where I'd like to change the toolbar from above to below the iframe's main content. So from this: <iframe> <html> <body> <div id='toolbar'></div> <div id='main_content'></div> <div id='other_stuff'></div> </body> </html> </iframe> To this: <iframe> <html> <body> <div id='main_content'></div> <div id='toolbar

Changing DOM element order with CSS (Crocodoc) [duplicate]

徘徊边缘 提交于 2019-12-19 10:48:11
问题 This question already has answers here : How can I reorder my divs using only CSS? (24 answers) Closed 4 months ago . Is it possible to change DOM element order with CSS? I have an iframe where I'd like to change the toolbar from above to below the iframe's main content. So from this: <iframe> <html> <body> <div id='toolbar'></div> <div id='main_content'></div> <div id='other_stuff'></div> </body> </html> </iframe> To this: <iframe> <html> <body> <div id='main_content'></div> <div id='toolbar

click on iframe element using Python selenium

时光怂恿深爱的人放手 提交于 2019-12-19 10:04:53
问题 how can i click the red button here from Host A (in this example jsfiddle.net) using selenium python? (java script limitation policy error do not let me to do it). also i do not want to click directly Red Button . thanks. el =driver.find_element_by_xpath("/html/body/div2/input") webdriver.ActionChains(driver).move_to_element(el).click(el).perform() iframe that keeps red button: <iframe src="http://www.myhostb.blogfa.com/" width="500" height="300"> </iframe> important note: imaging that

Fetching metadata from url

瘦欲@ 提交于 2019-12-19 09:37:21
问题 I have used Jsoup library to fetch the metadata from url. Document doc = Jsoup.connect("http://www.google.com").get(); String keywords = doc.select("meta[name=keywords]").first().attr("content"); System.out.println("Meta keyword : " + keywords); String description = doc.select("meta[name=description]").get(0).attr("content"); Elements images = doc.select("img[src~=(?i)\\.(png|jpe?g|gif)]"); String src = images.get(0).attr("src"); System.out.println("Meta description : " + description); System

How to handle cross-domain web service calls from JS in Orchard CMS

我们两清 提交于 2019-12-19 07:27:10
问题 I am trying to call a web service cross domain from within an HTML widget. This does not seem to work. It worked great under the same domain. I am trying to create a log in page within Orchard that could be used to log in to my software on another domain. The web service is validating the user credentials and returning a boolean which then would generate the users authentication. I read that I could use an HTTP Handler or another web service (on the Orchard side) to call the web service on

Can I test if URL is reachable using AJAX + cross-domain + jsonp?

时光总嘲笑我的痴心妄想 提交于 2019-12-19 07:15:48
问题 I'm using JQuery to fetch information from an URL and display it on my page asynchronously. The URL comes from other domain, so I use JSONP to get the data. That works fine. However, when the remote URL is down (which happens once in a while) my page hangs as JQuery AJAX doesn't call the 'success' or 'error' functions. I'm using JQuery 1.7. My code looks like: $.ajax({ type : "GET", url : "http://otherdomain.com/somePage.html", data : params, dataType : "jsonp", jsonp : "jsonp", success :