ajax

add a category field inside product form in rails

I have product and category models, what i want to do is to add a category field inside add new product form (i want it to update in ajax format) my form is something like this : <fieldset> <legend> <%= @form_title %> </legend> <%= error_messages_for 'theme' , :header_message => "موارد زیر دارای اشکال می باشند، لطفا...

Javascript/jQuery variables not giving expected values.

Like others before me I'm struggling with scope in Javascript. (That and trying to read the darn stuff). I have checked some of the previous threads on this question but I cant seem to get them to apply correctly to my issuue. In the example below, I want to manipulate the values in the tagsArr array, once the array has been fully popula...

Any way to gracefully enforce a timeout limit when loading a slow external file via javascript?

I'm using javascript to include some content served up from a php file on another server. However, this other service can sometimes get flaky and either take a long time to load or will not load at all. Is there a way in JS to try to get the external data for x number of seconds before failing and displaying a "please try again" messag...

How can I watch (i.e. debug) xmlHttpRequest() actions in IE8 ? (using Firebug Lite)

I normally do my web dev using Firefox - I periodically test for cross browser compatability of my pages by using FF and IE. I have just found that one of my AJAX pages stopped working in IE - although it works fine in FF. With FF, I always use FireBug to debug my Ajax interactions. I am looking for a similar tool to use with IE - to se...

Google Chrome: XMLHttpRequest.send() not working while doing POST.

I'm working on an application that allows the user to send a file using a form (a POST request), and that executes a series of GET requests while that file is being uploaded to gather information about the state of the upload. It works fine in IE and Firefox, but not so much in Chrome and Safari. The problem is that even though send() ...

Posting cross-domain JSON to ASP.NET with jQuery

Got kind of a tricky problem. I'm working on a project where we need to allow receipt printouts when users check out on our site at a kiosk. For reasons relating to drivers and formatting, I am using COM automation with Word to handle printing out the receipts. I've wrapped this code up in a web service that runs on a local machine. Th...

jQuery event help - I have a Select list with OptGroups, I want to call function only if option belongs to a certain optgroup

Hi All, I have a select list with optgroups. I want to add a handler for the drop down selected index change, how do I tell which optgroup the selected item belongs to? This determines further execution path. I understand how to add the function, the function contents are more the issue. $ddl.bind("change", function(){ //how do I find...

Ajax Logging on any site

All, Is there a way to log all clicks(like hyperlinks,buttons,.....) performed by the user on the client on any webpage and send it to server for logging purpose.If so please direct me to a sample code for it. Thanks...... ...

Cross Domain Limitations With Ajax - JSON

When requesting (ht|x)ml with ajax you can only send requests to the same domain. But if you request JSON you can send it to any domain. Why? I'm told it's for security but why would a website do something malicious via ajax rather than just directly if that makes sense. ...

maintain function order in jQuery ajax callback function

I have a jQuery ajax function. the callback function consists of two functions: 1) Take the ajax result (which is an html form) and insert it as an html span's inner html. 2) Submit this form How can I ensure that the form is loaded before JavaScript tries to submit it? Code: $("select").live("change", function(){ FormUpdate(); }...

YUI PieChart does not display legend, why?

HI, all. I'm using YUI 2.5 for a project and trying to display a PieChart for some results. The problem is when I apply the style: attribute to the PieChart constructor for adding a legend, the PieChart won't show up anymore. I can see that there's a flash component on the page (by rightclicking) but no chart displayed at all, any reaso...

ModalPopupExtender: Dragging dialog box results in 'scrollleft is null or not an object' error

I am using the ModalPopupExtender control to display a modal popup dialog when a button is click. The problem is that dragging the dialog results in an 'scrollleft is null or not an object' error. Here's a video demo ..and here is ALL the code: If possible, I'd like to resolve this problem w/o resorting to modifying the AjaxToolkit s...

Maintain value in Fileupload control in asp.net,C#

Hi, i am using Fileupload and 3 dropdown control in update panel, 3 dropdown will be post back on dropdown selected index change event (i.e like Country,states and city... get the value from db as per country,states and city) THE PROBLEM IS While postback the filename path is gone from the file upload control(as expected/ or Defau...

How to code jquery in codeigniter.

I have the following controller and view. I am trying to learn jquery in codeigniter. The code does not work. So I am hoping someone spot out what I am doing wrong and correct me. Thanks in advance. class PhpJqueryBook extends Controller { function __construct() { parent::Controller(); } public function index() { ... } funct...

temporarily removing and later reinserting a DOM element?

Hello, Is there some jquery magic that will let me do the following: [0- define some element in HTML (eg, a unchecked checkbox)] 1- update its DOM element by setting one of its attributes using .attr() (eg, by setting its "checked" attribute using .attr('checked', true) ) 2- temporarily remove that element from the DOM 3- reinsert t...

Rails and Ajax - form_remote_tag Can't find my error.

Hello! On my site, the user can watch his profile. In his profile he can have a look at his data (i.e. signature). Now I want my users being able to edit this data while watching it. So I coded the following in my view: <div id="profile-signature"> <p> <b>Signature:</b> <%=h @user.signature %> </p> <%= form_remote_tag(:up...

AJAX page + SQL query behaving vaguely ?!

I'll try my level best to describe the problem in words here since it's quite confusing. An 'sql' query gives no output, Through ajax page, when variables are passed in the query. Even the count of number of rows gives 0. So, I 'echoed' the same query which has the passed variables now having the values. When 'copy'-'pasted' the same (re...

Web Proxy (PHP & curl), AJAX and Multidimensional associative $_POST Array or $_SERVER['QUERY_STRING']?

I've got an html form that submits via AJAX (jquery Form Plugin) to a PHP Web Proxy on my server. The web proxy uses curl to POST to a third party script. My html form has inputs with names like p[fname], p[lname], c[name], p[loc], p[loc][email], p[loc][email][detail]. The names are specified by the third party application. When I use ...

Codeigniter JQuery Ajax

Hello, I'm a heavy Codeignitor user and currently I have to build a page with extensive AJAX bits and pieces. I have been using JQuery all along the website and it's AJAX handling was perfect up until now. There is something that just doesn't feel right when i use a MVC with JQuery. For example: in Jquery I setup the callback URL easily...

Jquery Ajax loading form on asp.net webform

I'm loading using $.load() a .aspx page on a div of a parent .aspx, let's say. When the content is loaded a new form is placed in the code, inside the aspnetForm. I've done this before in a very similiar way, but this time the submit button is submitting the new form to the ajax loaded page, not the aspnetForm parent page. Edit: More ...