Skip to content
Advertisement

Tag: ajax

Resizing ‘iframe’ after inside content is loaded

I have an iFrame in which I am loading a page which uses ajax to load data after various page labels are clicked. Now I am using Javascript function to calculate loaded-data height for replacing iframe’s height which results into resizing iframe and thus avoids scrollbars. Now my problem is script gets called as soon as labels are clicked, but

Check if innerHTML is empty

I have a ajax call on my onkeyup event, that checks if the given email address is in the database or not. My problem is, that I can’t find a right solution to check if the ajax response is EMPTY and if yes I need to disable a button. This is the ajax.php output: This is the JavaScript for the

Ajax call Into MVC Controller- URL Issue

I’ve looked at the previously-posted jQuery/MVC questions and haven’t found a workable answer. I have the following JavaScript code: When calling the Url the post looks like: Why does it return it like this (the logic behind it) and what’s a solution? P.S.: Additional Information: %22 is the URL Encoding Reference for <<“>> character Answer In order for this to

Cross-Origin XMLHttpRequest in chrome extensions

According to chrome extensions API cross-origin calls using XMLHttpRequest object should be allowed if permissions are set: An extension can talk to remote servers outside of its origin, as long as it first requests cross-origin permissions. I am closely following the Google tutorial, but the code below is giving me an error message: XMLHttpRequest cannot load http://www.google.com/search?hl=en&q=ajax. Origin chrome-extension://bmehmboknpnjgjbmiaoidkkjfcgiimbo is

How to communicate between iframe and the parent site?

The website in the iframe isn’t located in the same domain, but both are mine, and I would like to communicate between the iframe and the parent site. Is it possible? Answer With different domains, it is not possible to call methods or access the iframe’s content document directly. You have to use cross-document messaging. parent -> iframe For example

load scripts asynchronously

I am using several plugins, custom widgets and some other libraries from JQuery. as a result I have several .js and .css files. I need to create a loader for my site because it takes some time to load. it will be nice if I can display the loader before importing all the: I have found several tutorials that enable

How to count active javascript timeouts?

I am using Selenium to test a web app that uses Dojo, and it uses java script to display certain elements. I want to wait until all of the elements are desplayed before I try to manipulate the page, however I am having trouble. I have started by waiting for the dojo inFlight variable to be 0, this says that

Sending Javascript Object to PHP via Ajax

I’m learning Ajax by failure and have hit a wall: I have an array (if it matters, the array is storing number id’s based on what checkboxes the user checks) that is written in Javascript. I have a function that is called when the user clicks the ‘save’ button. The function is as follows: My question is: What can I

URL Encode a string in jQuery for an AJAX request

I’m implementing Google’s Instant Search in my application. I’d like to fire off HTTP requests as the user types in the text input. The only problem I’m having is that when the user gets to a space in between first and last names, the space is not encoded as a +, thus breaking the search. How can I either replace

Advertisement