ajax

Implementing Real-Time Collaboration On A Page?

I would like to create a web page which would allow multiple users to work together on a page, Imagine a web based editor that allowed to users to change the documents as an example of this type of feature. How would more experienced programmers go about implementing this as i really cant seem to formulate any way to even begin going ab...

Redirection after session expiry for an ajax/json call

Hello I am working on getting data from database by sending a piece of value using the getJSON method of JQuery library, to a PHP function which fetches data from the database. The data is then put into an name:value pair array and is json encoded and returned/echoed. This would help jQuery to populate the required HTML elements with the...

refresh html page when a new sql entry has been inputted

So I have an external script that will sometimes input something into a sql database throughout the day (usually about 3 times a day, but could potentially update ever minute) I need to find a way to make the html page (that displays the sql entries) refresh automatically when there is a new entry that's added. Any suggestions for PHP an...

submitHandler jquery.validate.js

hi very good, I want to summarize what I send the image, ie the input file, does not reach the addimagen.php file, and sure it's a javascript problem, because with php alone, if you do it right. I would like to know because I sent all the information I have the form, I have been doing some checks and not sending me and why it shows me ...

javascrip/jquery and php ajax force error

Is it possible to force an error state to return to an ajax request from a php script. I am handling the success and error states in an ajax request and i want a way to force the error. The error only seems to be triggered b y xhttp error and i want to trigger this when a condition is not met at the server. Its seems confusing to have...

Add delay before sending new ajax request using jquery

I have a list of links wich point to html pages. <ul id="item-list"> <li><a href="assets/data/item1.html">Item 1</a></li> <li><a href="assets/data/item2.html">Item 2</a></li> <li><a href="assets/data/item3.html">Item 3</a></li> <li><a href="assets/data/item3.html">Item 4</a></li> </ul> And i have a javascript(jquery) ...

PHP - form checkbox submit with ajax

Hi, I hava set up AJAX script that when you click the button it calls a PHP document. The problem I have is now some of the variables of the PHP file are set to constant, and now I want them to be conditional to what gets sent when the button is clicked. I want there to be a check box, that if clicked, will set a PHP variable to be TR...

How do I create an ajax toggle for an attribute in Rails?

I have a view of a Model, and there is an attribute 'direct' which can either be 'true' or 'false'. Am wondering if there's a standard way or even a plugin/gem or just good suggestions on how that can be toggled on or off in the view. I found myself writing alot of logic in the view so stopped and sought some guidance. A simple versio...

JQuery .load() callback function

I've seen lots of questions and solutions to problems like this but nothing has worked for me. I have this: function() { $("#bdiv").load("bosses.php #icc10n",function(){ return $("#bdiv").html(); }); } But it's not working. To clarify, I want to load content into #bdiv and then return the contents of #bdiv. But it seem...

URL concatenation javascript for selected (or not) checkboxes

Hi, I have this code for that "sends by" GET true or false concerning if a checkbox is checked or not: var isChecked = document.myform.checkbox.checked ? 1 : 0; var isChecked0 = document.myform.checkbox0.checked ? 1 : 0; var isChecked1 = document.myform.checkbox1.checked ? 1 : 0; xmlhttp.open("GET","roulette2.php?boxchecked=" + isChec...

Voting with Ajax in Rails

I'm trying to allow users to vote a record up/down with Ajax. I'm using the vote_fu plugin for the voting functionality, and everything works fine without Ajax. I'm now trying to figure out the best way to implement the asynchronous functionality with unobtrusive javascript. What I'm doing now is having two buttons, "Up" and "Down", suc...

ASP.NET MVC Long-Lived Complex Object

The title is a bit complicated, but it fits my problem. I have a complex object that acts more like a service that I need to expose within the scope of a user's session. The majority of the application will exist within a page or two and numerous ajax calls for dynamic interaction with the service. I'm still getting used to MVC so exc...

Good Ajax book for a PHP guy?

I have a background in assembly, basic, pascal, ada, c & c++. All pc or embedded stuff. Decades of it. I also have a few years of PHP. I haven't coded any client-side stuff, and think that I would like to look into Ajax (is that the best compliment to PHP?). What's a good book to start me off? ...

jQuery Ajax request to local disk with IE takes too long

I have an application which is javascript and HTML to be delivered with about 500 short (18MB) videos on 2 physical discs. I'm making an ajax request to check a file exists before displaying it, if it does not I prompt the user to insert the other disc. video.innerHTML = "<p class=\"no-video\">Working...</p>"; $.ajax({ url: "movi...

Troubleshooting ASP.Net caching - CacheDuration property seems to have no effect

I'm trying to get ASP.Net to cache the response of a web service request by setting the CacheDuration property of the WebMethod attribute: [WebMethod(CacheDuration = 60)] [ScriptMethod(UseHttpGet = true)] public static List<string> GetNames() { return InnerGetNames(); } The above is a method on an ASP.Net page (I've also tried mov...

jQuery ajax tries to send cross domain and gets 403 foribben but its on the same domain

Im trying to do an ajax call to my php file on the same server. I found a url fetching script similar to Facebook to get links. http://wakeupzee.netai.net/99points/facebook_url_extracting/ Works pretty good actually. Anyway, I want to save the info it's extracting to the DB. When I pull the src of the img link, somehow Im getting a 403 f...

$.post does not submit data

$("#contact-us-form").submit(function () { var nameVal = $("input[name=name]").val(); var companyVal = $("input[name=company]").val(); var titleVal = $("input[name=title]").val(); var emailVal = $("input[name=email]").val(); var phoneVal = $("input[name=phone]").val(); var messageVal = $("input[name=message]").va...

determining the index of item in the list view or grid view when using paging.

i have the following problem concerning the index:: my source code:: <table style="width: 80%"> <tr> <td> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> ...

setting culture in MVC Ajax request

In my view I have the following code (for checking if user exists): $('#CheckAvailability').click(function () { var username = $('#Member_Username').val(); var oldusername = $('#Member_Oldusername').val(); if (username != null) { $.ajax({ type: "GET", url: "/Admin/M...

AJAX call to REST web service

Hi, I have a REST web service located at http://localhost/doSomething accepting HTTP GET e.g. http://localhost/doSomething/1. It @Consumes nothing and @Produces application/xml or application/json. I'd like to be able to call this web service from a simple HTML form/JavaScript but I while I can get the web service to invoke I cannot ge...