Hi I'm wondering if there's anyway to stream a binary response in AJAX? This would be an ultimate solution otherwise I would need to realize the binary image to a file then stream that file to the user with a different URL.
new Ajax.Request('/viewImage?id=123', {
// request returns a binary image inputstream
onSuccess: function(tra...
Hi,
how do I pass a 2-dimensional array from javascript to ruby, please? I have this on client side:
function send_data() {
var testdata = {
"1": {
"name": "client_1",
"note": "bigboy"
},
"2": {
"name": "client_2",
"note": "smallboy"
}
}
consol...
Hi
I tried to override HTTP request header content by using jQuery's AJAX function. It looks like this
$.ajax({
type : "POST",
url : url,
data : data,
contentType: "application/x-www-form-urlencoded;charset=big5",
beforeSend: function(xhr) {
xhr.setRequestHeader("Accept-Charset","big5");
xhr.setRequestHeader("Content-Typ...
I have a controller which has a method called history
class UsersController < ApplicationController
def history
User.return_history(params[:id])
end
end
I have the following in my routes.rb file
map.resources :users, :shallow => true do |user|
user.resources :friends, :shallow => false
user.resources :posts, :colle...
Hi,
I have an user registration on my site.
I want to look it cool, so my plan is, that after a textbox is left, a green or red sign right behind the textbox tell the user if e.g. the username is unused, the email-adress is unused, the password is correct entered twice and so on.
Yes, I know the validation controls, but there are only...
in my web application i have taken a ajax calender in that i want to restrict the user to select future date, when user select future date should raise the error help me thank u.
...
I make an AJAX GET request to a PHP script to compare a value in a textfield to one in a database on every character typed - this works smoothly and beautifully on my laptop (Windows).
I transfer my scripts to computer running windows server 2003 and it tries to make a GET request but it returns a "500 Internal Server Error"?!
What is ...
Im trying to add an element to a database and then return a new id for it based on the the sql_insert_id
Its adding the element correctly and the console is returning the id i want to use but for some reason its not actually changing it on the element.
Im just using an echo in my actions.php script to return the string.
$(".add").clic...
i have following data to save in database using php
my data is : 12 ÷ 5
i have following code
$.ajax({
type: "POST",
url: "add_proc.php",
data: "topic="+ encodeURIComponent(field1)
when i check value of field1 in firebug its same (12 ÷ 5)
but when value save in database is 12 ÷ 5
$topic=mysql_escape_str...
Hi,
$.ajax({
method: "post"
, url: "save.php"
, data: "id=453&action=test"
, beforeSend: function(){
}
, complete: function(){
}
, success: function(html){
$("#mydiv").append(html);
}
});
I have set method type as post but in Save.php I just get values either in $_GET or $_REQ...
I'm attempting to dynamically set the backgroundImage for a div where the image source url is not the true/final destination url but instead returns a 301 redirect pointing to the actual image url. Using this redirecting url in a standard < img src=" ... tag works normally as the browser transparently follows the redirect. However, it ap...
Please note this is a popup and NOT modal popup. The users do not want a modal popup.
Is it a good idea to use an Ajax Popup Control extender in the following circumstances;
I want to populate a textbox. When the user clicks on it, he sees a popup window.
In the popup window you can enter value of the field, or make a selection from a dr...
I'm writing an ASP.NET webpart for use in a SharePoint site and trying to use an UpdatePanel to render query results. I want to use a JQuery plugin to modify the table returned from the asynchronous postback, but I'm having trouble getting the startup script to execute on the asynchronous udpate.
I found this post which indicates tha...
This is what is being passed (as seen by PHP), which is a little jacked up:
[action] => AddDailyDeal
[addDailyDealFormProductTitle] => Gatorade 20 oz. bottle
[addDailyDealFormPrice] => 1.23
[addDailyDealFormShippingCost] => 4.56
[addDailyDealFormDealURL] => http://www.dealurtl.com
[addDailyDealFormTrackingImageURL] => http://www.trackin...
Requirements:
On a web page in our web application, we have a requirement to upload a file. The file is most likely to be a pdf (pdf file has form fields filled in by users), or scanned jpeg/tiff/gif files in zipped format where user has scanned the form.
The size of the file is likely to be be 3-7Mb.
The file will be stored in as BLOD...
i have list of rows that user select and i want to delete them, one by one and show the result in the end.
obviously if i just do simple loop and call each time ajax function, but how can i loop and check which one successed and which one failed and when they are all done?
how would you do it? what is proper way of doing the bulk editi...
In a webpage, it uses YUI connection manager/datasource to send AJAX requests to the server, if the session (which contains the info on whether the user has been authenticated) has already timed out, those ajax responses that can only be viewed by authenticated users should return an http status code, telling the client that the session ...
I have a php file somejson.php that echos a json encoded array
{"jsonone":"first json","jsontwo":"second json"}
I'm trying to access the response with jquery ajax to use this data outside the score of the ajax call. It keeps giving me all kinds of object(Object) or undefined errors.
I'm guessing it's something as easy as wrong synta...
Hi All:
I have been working on the last bit of my php + ajax based datagrid project.Everything works as I designed except one thing : I cannot stop user opening multiple selection boxes...
Go my research page and use username "ChenxiMao" and password "accedo" to login(without double quotes).
Note that perhaps the images used in th...
Allo,
EDIT:
1- OPEN FIREBUG, on the console tab
2- OPEN YOUR GMAIL ACCOUNT,
3- when gmail is loaded, click on one of your label (at the left under the draft box)
4- WITH FIREBUG YOU SEE THAT THE PAGE DOES NOT COMLETLY RELAOD SINCE ALL PREVIOUS ACTION STILL THERE FOR THE CURRENT DOCUMENT, BUT THE BROWSER COMPLETLY ACT LIKE THE PAGE...