JavaScript code I'm starting with:
function doSomething(url) {
$.ajax({ type: "GET",
url: url,
dataType: "xml",
success: rssToTarget
});
}
Pattern I would like to use:
//where elem is the target that should receive new items via DOM (appendChild)
function doSomething(url, elem) {
...
Hi, I have a web site that contains Master Pages as follows:
ApplicationFolder
Root.Master
User Folder
User.Master inherited from Root.Master
Data.aspx inherited from User.Master In Root.Master Page
There is a ScriptManager control I put to Root.Master in case I can use updatepanel in any page....
Hi,
I have the following situation, i have a service project (ASMX) and a web project (ASPX) which i run localy on ASP.NET Development Server.
I have a jQuery script that contain a handfull of functions which is calling the local asmx service (hence, the jQuery script is on the service project /Scripts - doing some database insertion a...
If javascript modifies DOM in page A, user navigates to page B and then hits back button to get back to the page A. All modifications to DOM of page A are lost and user is presented with version that was originally retrieved from the server.
It works that way on stackoverflow, reddit and many other popular websites. (try to add test com...
I have the following Rails partial...
<% remote_form_for :ride, :url => {:action => "create"}, :html => {:id => form_name} do |f| %>
<%= f.error_messages %>
<td>
<%= f.text_field :name %>
</td>
<td>
<%= f.text_field :land %>
</td>
<td>
<%= f.text_field :height_restriction %>
</td>
<td colspan="2">
<%= sub...
So I'm creating a javascript menu and trying to implement an onblur event for when a user clicks something outside the menu so it will collaspe.
To implement this, I simply attached an event to the window and looked for any clicks and if it nor its parents elements didn't meet a certain criteria then I would close the menu.
This works ...
One of my pages has about 5 jQuery AJAX calls that fire off as soon as the page loads. I know that I can track each AJAX call individually and know when it is complete, but is there any way to track them as a whole? This way, I'll know when the last AJAX call is complete and I can signal a UI change.
I guess I could keep a running count...
My problem is that this JSON is not being parsed by JavaScript or the jQuery API. I am including the code below and a URL where the JSON output is.
This JSON is being parsed in JavaScript as nothing:
//something like this:
alert(data); // gives an object
alert(data.horas[0].hora; // gives undefined
The JSON itself:
{"horas": [{"hora...
Hi,
I am creating a .aspx page to respond to ajax requests.
If I return json back, how do I set the content type so my calling page receives the JSON properly?
I'm using jquery if that matters.
...
Hello,
I have an existing jQuery plugin which makes a lot of AJAX calls (mostly JSON). I am wondering what is the quickest to allow it to do cross-site calls i.e. the $.get and $.post URL's will not be from the same domain.
I have heard of JSONP, but was wondering if someone could give me an concrete example to go about the whole proce...
It seems that the sites and applications that use AJAX are growing rapidly. And probably one of the major reasons for using AJAX is to enhance the user experience. My concern is that just because the project CAN use AJAX, doesn't mean that it SHOULD.
It could be that AJAX is exposing more security threats to the site/app for the sake o...
My problem is: in firefox i got no response. in ie it worked fine.
I want a ajax call to a local script getting some information in plain text or something else. but it won't work. I think cross scripting should not a problem at this point or?
the javascript code is simple:
var targetUrl = "http://localhost/jQueryProxy.php";
var parame...
I'm trying to test using QTP a web app that is using ajax4jsf to implement the ajax features.
QTP doesn't have the ability to recognize when the ajax had finished.
I've read that the web extensibility toolkit that is provided with QTP 9.5 and QTP 10 is the solution for my problem.
However, I can't understand how this can help me: I need ...
Sorry, this looks longer than it probably is but I thought I should include all the information!
I'm using a simple Ajax script to dynamically bring content into a <div> on a page. The first request to load some new content into the div works fine, but if I've got an Ajax "back" link within the content which has just loaded, it seems to...
Ok Hi
Help help help
I am having a major problem with setTimeout it is not working and i did everything not working
I am developping a chat system so i need to send and recieve messages (i test it by opening 2 browser windows)
Here is the code i changed many times
I hope any one can help me
javascript
$(document).ready(function()
...
Hello there! I've having an issue with consuming a particular feed for a client. They have given me a remote URL and the response is a JSON string like so:
{"affiliate": [
{"ID":"1", "COUNTRY":"EXAMPLE", "NETWORK":"EXAMPLE", "PRIMARY":"EXAMPLE"},
{"ID":"2", "EXAMPLE":"EXAMPLE", "COUNTRY":"EXAMPLE", "NETWORK":"EXAMPLE", "PRIMARY":"EXAMPL...
I am populating a select box from jquery $.post();
The option values returned from the post have one option with " selected='selected' " but rather than setting the control to this option the last option in the string is selected and displayed.
The last option has it's selected property set to true but firebug shows the selected text a...
One thing I have noticed with php, is that nothing is output to the screen until the script has stopped working. For the project I am working on I feed in a list of over 100 items and it performs a HTTP request for each item and when finished, shows a page with the status of each item, success failure etc.
What I want to know is if ther...
Why does jQuery.ajax() throw an error with no error message if you use a URL with a dfferent server?
...
So, you have a page:
<html><head>
<script type="text/javascript" src="jquery.1.3.2.js"></script>
<script type="text/javascript">
$(function() {
var onajax = function(e) { alert($(e.target).text()); };
var onclick = function(e) { $(e.target).load('foobar'); };
$('#a,#b').ajaxStart(onajax).click(onclick);
});
</script></head><body>
...