ajax

How do I implement this image annotation javascript using AJAX with Rails?

There is a blog post that details how to do this with PHP, but I'm not clear on how to translate this to Ruby on Rails. For the getUrl, saveUrl, and deleteUrl what do I put so that I can hook it up to my AnnotationsController and create, read, and delete Annotation models? There is also server side code in PHP. jquery-image-annotate i...

GET data from server via JQuery call and load into DIV without refreshing page

I've spent the best part of 90 minutes sifting through the many tutorials relating to this problem. Instead of using the rather long winded way of creating a XHR object , sending the request, getting the data back, doing a getElementById to find the div then loading the response into the div. I'm looking for a far more simpler - easier ...

PHP: How will array depth influence performance?

Now I know there is some related questions on this topic but this is somewhat unique. I have two array structures : array( [0] => array( 'stat1' => 50, 'stat2' => 12, 'stat3' => 0, 'country_name' => 'United States' ), [1] => array( 'stat1' => 40, 'stat2' => 38, 'st...

ColdFusion & Ajax: Error Invoking CFC

I have tried multiple tutorials on this topic from Forta.com and yet run into the same error: "Error invoking CFC/....(file path)../wgn.cfc: Internal Server Error [Enable debugging by adding 'cfdebug to your URL parameters to see more info]" I am working on my local machine and testing as localhost. Running WinXP Pro with sp3. Using ...

jQuery AJAX post with fileupload

I have a functional page posting data to a Page WebMethod [WebMethod()] public static string sayHello(string pTest, string pText) { return pTest + " - " + pText; } which I call using this jQuery $(document).ready(function () { $("#sayHelloButton").click(function (event) { var name = $('#name').val(); var text = $('#text')...

Detect new $_SESSION variable without refresh. Maybe AJAX?

Hi there, I'm currently building a website which fetches youtube videos and flickr images and lets users comment on them on the website. While having it's own commenting system, the website also has an option to login with youtube/flickr to comment on youtube or flickr with their usernames. I'm doing this by opening a popup window (re...

Passing an array of values in an ASP.NET jQuery AJAX POST

I have a ListBox on my page, and I'd like to make an AJAX post containing all the selected items. Here's my code: $('#btnSubmit').click(function() { $.ajax({ type: "POST", url: 'Default.aspx/GetSelectedValues', data: '{selectedValues: }', contentType: "application/json; charset=utf-8", dataTyp...

IE7 & IE8 error with mootools+json request Access is denied

In mootools I use the Request.JSON(options).get(); to send a request to the server. Options is: {'onSuccess':function(){alert(1)},'url':'https://192.168.12.219/reports/get/favorite/details/?report_id=7'} the url I am in is: https://192.168.12.219/reports/container/ So I do not see any issues with cross domain (this code works perfectl...

AJAX To Call and Run PHP Script

Hello StackOverflow, I have a working PHP script on my server and a HTML page with JavaScript and AJAX which I would like to call and run the PHP script. However, the AJAX responseText is displaying all the PHP code rather than running it. What do I need to do to only get the results of the PHP? Other examples I looked at used the re...

ColdFusion & Ajax: How to Get Blank Row in Binded Select Box?

I have two cfselect boxes that use binds and a cfc. One is State. Choose a State, and the second cfselect (counties) is populated on the fly. Prior to doing this with the bind attribute, I relied on the queryPostion="below" attribute such as the following to basically put a blank row into the option box. I want to do the same thing f...

JQuery Ajax with multiple return values from ASP.NET

Hi, How can I return multiple values from JQuery.Ajax() in the success function ? I tried it: $.ajax({ type: "POST", url: "default.aspx/myFunction", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", suc...

AJAX Security Help

Hello Everyone, I have an AJAX Function that calls a PHP Script and displays the result on a page. So, i have two pages, say: form.php - This is where the Input is gathered and displayed process.php - This is the php that is called and result from this is displayed on form.php Now, here is my AJAX Function: function showList(str) { ...

Help me with algorithm.. Javascript

On my page I'm making ajax-request to get data from server. The data is list of JSON objects.. Every object has name, description and datetime. How can I get the object which is the closer to my real data in browser... Example: $(json).each( function(i) { alert(json.datetime) //here have to be some algorithm to c...

Best way to manage and initialize JS objects that represent DOM elements

When creating a web page who's content will be created and destroyed dynamically by the user, what is the best way to structure and initialize both the javascript functionality and the DOM Elements? Example -- Lets say you have a todo-list who's items can be re-ordered, created, and destroyed by the user: Each Item will have a visual ...

posting comment script

I want to make a posting comment script that satisfies a limited page size,i.e the page doesn't stretch with the creasing comments,so i want to make a limited number of comment per page and after exceeding this number the comment is added in a new page,but the comments should be in a speciefic blockin the page so turning the comment page...

Can I get the word pronunciation data from Google AJAX Language API

Hi, is there a way to get a word pronunciation data from Google AJAX language API? I couldn't find any reference. Is it available at all? Thanks. ...

Updating a loading/saving message in JavaScript that clears after all callbacks are complete

I'm building an AJAX app that constantly saves to the server when the user changes things. Every time the user changes something, I want a status area to say "Saving..." (with animated ellipses) and then change back to "Saved" at the callback (when the server returns) In theory this is easy enough, because I could change the status area...

zend debugger not recognize jquery post

When posting forms using jquery post, the ZendDebugger lost its track. For example, I have a file index.php wich submit button post to "formContent.php". something like: //index.php $("#formMiData").submit(function(){ $.post("formContent.php", $("#formMiData").serialize(), function(data){ $("#salidaAjax").html(da...

Parse jQuery serialized data in C#

I have a ListBox on my page. I'm making an AJAX call to a C# function, and I need to pass the values of the selected items. Here's what I have: $('#btnSubmit').click(function() { $.ajax({ type: "POST", url: 'Default.aspx/GetSelectedValues', data: '{selectedValues: ' + $('#lbItems').serialize() + '}', ...

Copy (e.g. with load or find) with jQuery an HTML Markup with included Inline Script - How to realize?

Hey Stack'er I want to crop a part of an HTML markup with Inline-JavaScript included. Example: <div id="foo"> <div id="bar"> <script> ..some function.. </script> <p>...</p> </div> </div> With the jQuery functions find() and load() you are not able to copy the whole markup WITH the JS-Snippet includet...