Current scenario:
I'm using the gmail oauth api to receive emails on a page. It's slow to load many, so I want to post each email on the page as it loads giving the user a chance to do other things on the site while the emails are still loading.
There are a few files required
require_once 'common.php';
require_once 'Zend/Oauth/Co...
I have autocomplete, that simply calls $.ajax. And when its getting result, it tries to evaluate with globalEval function. That making
<script>
{"success": true}
</script>
Than IE says "Expected ;". Near I have another ajax call that is working good and without globalEval executing. What can cause this?
...
Is there a way I can load content dynamically using ajax and retain any jquery functionality that the loaded content may have?
For example, I'd like to load in a Twitter like feed of DB records. Each record can be voted thumbs up or thumbs down. The voting uses some AJAX and I can't retain event functionality when loaded into a parent...
I tried a couple of jQuery plugins for uploading a file. They can be found at:
http://www.phpletter.com/DOWNLOAD/ and http://lagoscript.org/jquery/upload.
I'm sure they work similarly in that they dynamically create an iframe with a form in it and then submit the data. The issue that I'm having is that when my JSON response comes bac...
Hi - I am creating an application using ROR and would like to know how I can implement a function which I want to call when using "sortable.create".
Below is a sample code from my "*.html.erb" file.
<script type="text/javascript">
Sortable.create("table_retain", {
tag:"tr" , dropOnEmpty: true, onUpdate: function() { alert ('Up...
Hey everyone!
I have a question that doesn't need any specific answer, just a general direction of what to do. I work for a company that has many sites. Each site requires a login at some point. We have a single Accounts database that all of the sites hit.
One of the requirements for the login system is that if we login on one site,...
I've been programming rails for only a few months and was first introduced to RJS in 2.3.8 rails. Though things have changed slightly and am a little confused with this "unobtrusive javascript". From reading google, I'm understanding it as like removing the javascript inline to a seperate file.
From what I understood of .rjs was it was...
I'm seeing some strange behaviour with my Rails3 app. Note that I'm using the jQuery version of rails.js
From rails.js starting at line :49
error: function (xhr, status, error) {
el.trigger('ajax:failure', [xhr, status, error]);
alert('error in: ' + xhr.responseText );
}
From my jQuery code to execute after the form.
.bin...
Rails - 3.0 - Trying to make an ajax call but I run into an error.
Controller - Home
def test
end
View - home#index
<div class="test">
Testing here
</div><%= link_to 'Test', test_path, :remote=>true %>
View - test.rjs
page[:test].replace_html :partial => "home/blah"
When I click on the link I get this -
try {
$("test"...
I have a form with a textarea (tinymce) for input content. When I perform an ajax request, I got the error:
A potentially dangerous Request.Form
value was detected from the client
Then I've tried something like
html.encodeURIComponent() or escape() but the error is still here
HTML:
<form id="editForm" action="" method="post">
...
I have a website where people can place bids on products. So the first thing I have done is created a normal HTML-PHP version of the website which works great.
I have created some basic PHP functions that look at the url -> route you to the controller -> perform the action -> take the POST object etc.
Now I have implemented an AJAX ver...
Hi I am still learning Jquery and have a problem accessing form elements. My script opens up a div and then fills it with a pre written html form. I am using ajax to get the form and jquery. This all works fine and I can see the div box with my form in it. The problem is I want to populate the innerhtml form and I have tried javascript a...
How can I determine the response type of ajax call in Jquery? At times, the server sends json response and at times it sends only the html for display purposes. Right now I am using
if(response.indexOf('Error)
//popup error message
else
response.username
response.address
...
hi i want to submit the page through following code but i can't get post data on ajax.php
please tell me where i am wrong
new Ajax(wgScriptPath +'/' + 'ajax.php', {
method: 'post',
data:{items:item},
onComplete: function(res)
{
////Code
}
...
I have two javascript adverts on my website (that have a tracking mechanism so I get a bonus if the user clicks the advert and signs up at the site being advertised).
Both of these poker adverts are interferring with my other javascript functions. For example, I have an ajax post form and when I fill it in to make a comment and click su...
I am in the process of building a video sharing CMS that uses lots of jQuery and ajax for everything from rich UI effects to submitting and retrieving data to and from the database. When JavaScript is disabled it everything falls apart and 90% of the functionality doesn't work.
I am beginning to think its ok to not degrade gracefully fo...
I usually go to the news of the story expanded, passes the variable with a while, as follows:
while ($noticias = @mysql_fetch_array($sql)) {
$sqll = mysql_query("SELECT * FROM categorias WHERE id='".$noticias['categoria']."'");
$datos = mysql_fetch_array($sqll);
<div class="leermas">[COLOR="red"]<a href="noticias.php?n='.$noticias['id']...
I'm working on a script right now for a simple shout box. I was using $.get() before without any issues. I then switched over to $.post() so I can pass Cyrillic characters to php.
I switched over everything to post already in both the javascript and php files. Firebug shows that the variables are not empty and being sent and their is ...
I'm trying to make an AJAX call in Rails to swap images on a page. The page has a big div that is initially blank, along with a table with several entries. One of the columns in this table contains the path for an image, and what I am trying to do is on user click, swap this image into the div.
I was hoping to have a controller variab...
Is it possible to customize the "Browse UI window" which always open when we upload photos / files? I want to acheive two things:
In the bottom it always says "All Files". I want to lock that to only .jpg, .jpeg, .png so only those files types can be selected for upload. Secondly extent that box so when the upload is complete the previe...