ajax

JSON formatting (Sending JSON via jQuery AJAX post to Java/Wicket server)

I'm using jQuery to post JSON to a Java server, but I think my JSON must be wrong. Here's an example of my data and how I'm sending it: var lookup = { 'name': name, 'description': description, 'items': [{ 'name': itemName, 'value': itemValue }] } $.ajax({ type: 'post', data: lookup, dataType:...

Asp.Net - JQuery ajax call button action

Let say I got the following button : <asp:Button ID="btnSearch" runat="server" /> and the following button event handler : Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSearch.Click How, with JQuery, can I call the button event handler ? What I mean is that I don't want the page to refresh, so...

Error when deleting row from AJAX enabled GridView

I'm trying to figure out why I can edit just fine inside my gridview, but my delete command yields a server error. The error message I get on the AJAX postback on a delete is as follows: 208|error|500|A property named 'Member.fullname' was not found on the entity during an insert, update, or delete operation. Check to ensure that pro...

Richfaces combobox on selection changed event

hello ! I have this code: <richfaces:comboBox value="#{ChoixContratBean.selectedFormule"} suggestionValues="#{ChoixContratBean.formules}"> <a4j:support event="onmouseover"action="#{ChoixContratBean.getDescriptionFormule}" reRender="reponse" /> </richfaces:comboBox> I would like that when the user hovers with ...

Monitor Database Updates Live using AJAX and SQL

How can one trigger an event locally when a field in a connected database changes? I've done some research but it seems like there there are varying and inconclusive answers to the question. I'm building an application where users rate comments, and I'd like to have the ratings change live when they are modified by a different user. For...

JQuery .ajax enters Success before calling page finishes

I've got the following code: <script type="text/javascript"> $(function(){ $("#AddMaps").submit(function(){ var $form = $('#AddMaps'); $.ajax({ type: 'POST', url: $form.attr( 'action' ), data: $form.serialize(), dataType: "json", ...

Ajax autocomple extender from a database

I want to create a textbox (for entering names) in my aspx application which suggests names of Employees from database. I am pasting my code below. I am using Mysql Default.aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxC...

MooTools Request Failing

So I have a bit of a problem. When I ask MooTools to send a request it comes back as failed every time. I can't seem to diagnose the problem either because if I try to get the returned header info the console just gives me "Refused to get unsafe header 'Status'" Message. The only thing I can think of is that the server isn't letting me a...

ajax suggestion not working with url rewrite? please help

i am not able to fetch xml or any kind of text pulled up with the help of ajax in a search suggestion. I have done url rewrite with mod rewrite. when i remove the url rwrite the code works fine. what may be a problem. RewriteRule ^f/fetchname/(.)/(.)$ http://www.domain.com/fetchname.php?fetchkey=$1&amp;cityidval=$2 [NC] ...

Submitting form via AJAX and getting response

In my rails app, I need to submit a form via ajax so that the form submit happens behind the scenes and doesn't require a full page reload. I did form_remote_tag, but I can't figure out how to get a response from it make sure it was successful. Is there a way to, or do people just trust it's always successful (eek!)? Or is there a bett...

Submitting form via prototype request causes 'Open with..." dialog to appear

I have a form created using HAML, that is submitted via: $('appt_form').request({ onComplete: function(){ ... } }) And for testing I have the controller simply returning: render :json => {:name => "Ted"}.to_json But that causes the browser to launch a dialog that has the options to 'Open with...' or 'Save As...'. ...

why jquery can't return string/text ?

default.aspx <button id="getGrouper">GetGroupers</button> <script type="text/javascript"> $(document).ready(function () { $("#getGrouper").click(function () { $.ajax({ type: "post", url: "Groupers.aspx/groupers", data: "{pid:25}", ...

Design of caching for a medium/small web app?

I have a web app that's currently ~700 LOC in JS (more is serverside). I'm using jQuery. As I find myself trying to minimize AJAX requests to the server, I've got an awkward mix of caching and spaghetti code developing. It feels like I need a more centralized solution. My idea: Create a map with the AJAX call to make (URL and args), and...

Could this be a good use of global variables?

Global state is conventionally frowned upon. However, I think I can use it clientside to make my app simpler. I have an AJAX web app that sets up several values when the user logs in - user id, as well as some other information. This info does not change for the lifetime of the app. I also have a cache of data to minimize trips to the...

Ajax/PHP .post, and .load dont return any data

I am working on an AJAX login/logout form. The login works fine, but when someone clicks on "logout" I am having a few problems. Javascript: $("#logout").live("click", function(){ $.post("/hd/ajax.php",{ logout: "1" }, function(data) { alert(data); }); }); Ajax.php: if(isset($HTTP_POST_VARS['logout']) && $HTTP_POST_VARS['...

order of ajax post requests getting mixed up

I have a page where the user sends data (via ajax) to a php page, which inputs it to a database. However, occasionally, the requests are getting out of order when I check the database. Basically, the user inputs events as they occur and hit submit to send it off to the database. Occasionally, the user will record 2 events before sending...

how to pass these strings from php to javascript

hello i have 4 strings in my application like this that i want to pass to my js file $a1='[10,20,13,14]'; $a2='[17,15,14,16]'; $a3='[18,24,16,17]'; $a4='[15,54,18,27]'; echo $a1.",".$a2.",".$a3.",".$a4; and my javascriptcode is $.ajax({ type: "POST", dataType: "json", url: "loaddata.php", ...

Web technologies for Web development

I plan to develop web site in PHP using MYSQL ...which applications call for the use of technologies like Ruby-on-Rails , AJAX and Coldfusion. Thx. ...

Handling multiple views via AJAX

I am using AJAX requests (more specifically, jQuery's load method) to load different views within the same HTML DIV. This works fine, but, some of these dynamically loaded pages have events hooked to them, for e.g. setTimeout, setInterval events, etc. My question is: How do I handle the loading & unloading of these events across the ...

Hiding an a4j:outputPanel and showing it on submit a4j command button ..

Hello, From now on, I have this : ..... <a4j:commandButton action="#{ChoixContratBean.Submit1}" reRender="suite" value="valider" > </a4j:commandButton> </a4j:outputPanel> <a4j:outputPanel display="none" id="suite"> <jsf:outputText id="reponseeFormule"............ which works. the suite panel is rerendered. But I wo...