ajax

unset hidden form cakephp

how do i unset this option from a input? im using ajax to populate this field and after that i need to show it thanks ...

$.ajax ignoring data param for DELETE requests

I just updated from jQuery 1.3.2 to 1.4.3, and I'm seeing some new behavior when making AJAX DELETE requests. For some reason, the data being passed in my data parameter is not being sent to the server. For example: $.ajax({ url: '/example', data: {id: 12}, type: 'DELETE' }); Ends up sending a DELETE request to /example ...

Parsing JSON with Javascript

I have a webservice (RestEasy) returning a JSON object containing a List<..> element. I am trying to parse the results in a Javascript for loop. If the List<> element has 2 or more elements, all is well. If the List<> element has only one element, the Javascript loop breaks. This is because the JSON respresentation actually changes when...

Whats wrong with my ajax request?

<script type="text/javascript"> var t; function tick() { xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200 && document.getElementById("txtHint").innerHTML!=xmlhttp.responseText) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } }...

ASP.net Jquery ajax autocomplete data

Hey, Is it possible to change the "data source"- the autocomplete from this jquery code: $(".textbox").autocomplete( "**autocomplete.php**", { delay: 10, minChars: 2, matchSubset: 1, matchContains: 1, cacheLength: 10, onItemSelect: selectItem, onFindValue: findValue, formatItem: formatItem, autoFill:...

why is my remote_form_tag with :action defined not posting the action?

This is what I've used with remote_form_tag: <% form_remote_tag(:url => {:controller => '/companies', :action => 'update'}, :update => 'tags') do %> <%= text_field :company, :tag_list %> <%= submit_tag 'Save' %> <% end %> This is in a Company.view, where Company is a model that is acts_as_taggable_on enabled. ...

Carriage Return (ASCII chr 13) is missing from textbox postback values when used within an ASP.NET Update panel

I have an ASP.NET TextBox with TextMode = TextBoxMode.MultiLine that is used within an AJAX Update Panel. The .Text value has been pre-set to a value that has multiple lines. When using Chrome(7.0.517.41) or Firefox(3.6.11) working with the controls posted back value on the server the carriage return is lost if the user hasn't edited th...

Ruby On Rails 3, form_tag remote on responding to Ajax request

Hello all, thanks for reading this post. I've been stuck on an issue with RoR for the past few days. I have a form under index.html.erb as: Ajax List Demo Listing posts <%= javascript_include_tag :defaults %> <%= csrf_meta_tag %> Add to list using Ajax <% form_tag :action => :list , :method=>:get, :remote=>true d...

jQuery: if i use .html to set the html content of an element, why it didn't displayed in source code

For example, I use: $('test-div').html("<div></div>") Actually the html is changed, but when I click "view source" from the browser, in browser the html is not changed, is it a bug for the browser? Thanks. ...

Ajax.BeginForm, Calls Action, Returns JSON, How do I access JSON object in my OnSuccess JS Function?

Ajax.BeginForm, Calls Action, Returns JSON, How do I access JSON object in my OnComplete JS Function? so my ajax.beginform looks like this... using (Ajax.BeginForm("Coupon", new AjaxOptions { OnSuccess = "CouponSubmitted" })) and my OnSuccess Function Looks like this... function CouponSubmitted() { var data = response.ge...

Javascript/Ajax help required

I want to create a photo gallery element which has a play button and the next/previous navigation... I can do the next and previous by using ajax load...and i do not want to preload the data for play functionality..the only way i can think of is using ajax call in a timer for play functionality...but again..calls will happen in an infini...

How to append rows to a table when the last row is visible in the browser?

Some sites have tables which appends rows when you scroll the browser so that the bottom of the table is visible. Guess it's something like this: jQuery detects that the end of the table is visible in the browser $.getJSON is used to fetch the next rows from the server the rows are appended. Questions: How do I detect that the las...

Refreshing the page using Ajax

How to refresh the page using Ajax? I mean pure Ajax, without any libraries used ...

How to send data to controller by using YAHOO connect and json

I can not send data to MVC controller using YAHOO connect library. Parameters query and filter are NULL. Where is the problem? // --- JavaScript --- // var callbacks = { // Successful XHR response handler success: function (o) { var messages = []; // Use the JSON Utility to parse the data...

How to change the default color picker popup looks in Ajax Toolkit ?

I am using the Ajax Toolkit for color picker. Default color picker just gives the tabular structure; i would like to extend/modify toolkits color picker popup with text box and the color code as shown in the second example below. Color Picker Can some one please help me how that can me done ? Thanks ...

get annoying error: form is not defined with AJAX, JQUERY MYSQL Fetch

Hi I've been building a site with a ajax feature that retrievs data from a Mysql database given a surtain variabel. Here is an example of how it's been done. http://www.lensfinder.se/testar5.php I'm given this error in Firefox when I choose different data to retrieve, the AJAX is activated on the select change. "form is not defined [...

Loading web application content through AJAX

I'm about to build a web application(not web presentation) which will load its content through AJAX (jQuery) into a specific div. There will be a menu above the div and when a user clicks on an item from the menu, the appropriate page will be loaded into the main div. I'd like to know if there are any cons and pros of choosing this patt...

jquery ui token

hello i have followed this tutorial wich uses jquery UI to generate tokens facebook like: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-use-the-jquery-ui-autocomplete-widget/ my problem is i need to pass two values thru Json: the ID and the NAME: the server side script looks like this: header('Content-Type: text/html; charse...

Need to fill datatable on click of a button. (using control of datatables.net)

I am using a custom control of datatables.net. Hi i need to fill the datatable on click of a button. this is the code that i have written on Load of the form $('#dtlist').dataTable({ "bPaginate": false, "bFilter": false, "bServerSide": true, "bSort": true, "sAjaxSource": 'Aja...

AJAX + PHP from with jQtouch and drupal

Im working on a drupal site that uses jQtouch (for iphone), and im trying to make a search that doesnt reload the site. I think the javascript/ajax part isnt working. Im having problems finding out if the data from the php file is actually comming through, at the moment only the js that empties the search-results is working. Apperently j...