jquery-ajax

jquery: passing variable by post to a php-file

The following is the part of a script, where i sent some values to a php-file: var order2 = $(ui.item).attr(\'id\') + \'&action2=insertList&feuser='.$feuser.'\'; $.post("index.php?eID=moveitems", order2, I know how to read f.e. the value of "action2" in the php, it s easy done with "$_POST['action2'];". but how to read out the valu...

Using jQuery, how can I get an image to open full screen to the browser's height and width?

I'd like to create a jQuery function that accepts an image url, and when executed, displays the image full screen matching the height and width of the current page. Thanks. ...

How to scroll browser view port to top of page after an ajax submit?

I have an upload form -- after the user submits the form, I'd like to scroll the window back to the top of the page (where I display some help text). How do I correctly scroll the window back to the top of the page? ...

Dynamically adding dropdowns to a form and validating them in ASP.NET MVC

I have a form with various inputs. I have a bunch of optional parameters that have some number of choices. I'd like to allow the user to select these optional parameters in the following way: First, the user clicks the Add Component button at the bottom of the form and two new dropdowns appear above the button. The first dropdown has...

Jquery form submit with PHP

Hi there, I need help with what I thought would be a simple form submit problem with Jquery, but am running into issues. I have a form, #listing_step_1, in which the user first selects a category from a dropdown. When a category has been selected, if the user clicks "next", the subcategory dropdown is revealed. When both a category a...

mvc controller returns 'html data' instead of view

i have a module controller which returns(renders) a view page (.aspx) into the main.aspx page but now i want the controller to return the entire content of .aspx page to the javascript function from where this controller has been called pls help my calling function in main.aspx $.get('/Module/Select/', { TemplateName: Te...

Ajax delete help...

I have table having 10 rows per page. I am using ajax to delete records from table. But when i delete a record i am left with nine rows, which is not desirable. How to maintain 10 rows per page (wherever applicable) after deletion. And off course i don't want to refresh the page too. ...

jQuery Ajax: redirect to other pages without wait the result

After clicking on a button I want to fire an Ajax call and then redirect to other pages without waiting the ajax result. Is it possible? My code as follow: $('button').click(function(){ $.get('mailer.php', function(){ window.location.replace("result.php"); }); }); The code above will wait for the ajax result before red...

Javascript pause problem in a loop, ajax, jquery

Hi I'm trying to create a simple animation. Long story short, I've got a list of 20 small divs and one outside div. I want to display five small divs within a large div at the time. Ideally, I would get a set of next 5 divs every 5 seconds. I'm using jquery ajax function to create small divs, here's the code: $(document).ready(function...

localhost != remote server

I've been developing / testing a site locally on a MAMP (e.g. LAMP) environment. I have a form that's processed by jQuery that works fine locally; I don't want it to be submitted, but to send the values to an AJAX function. The issue is that it submits to the 'action' destination of the form parameter when it's run on a remote server wi...

JQuery Validation Plugin: Use Custom Ajax Method

Hi Looking for some assistance with the Jquery form validation plugin if possible. I am validating the email field of my form on blur by making an ajax call to my database, which checks if the text in the email field is currently in the database. // Check email validity on Blur $('#sEmail').blur(function(){ // Grab E...

Passing arrays in ajax call using jQuery 1.4

The following code works for me using jQuery 1.2.6 but causes a broker error in 1.4. var items = new Array(); items[0] = "Item 1"; items[1] = "Item 2"; items[2] = "Item 3"; var dataToSend = {'_service' : myService, '_program' : myProgram, 'selections' : items} ; $.ajax({ type: "post", url: myURL, dataType: "text", data: dataTo...

How can I determine/use $(this) in js callback script

I am using Rails and jQuery, making an ajax call initiated by clicking a link. I setup my application.js file to look like the one proposed here and it works great. The problem I'm having is how can I use $(this) in my say.. update.js.erb file to represent the link I clicked? I don't want to have to assign an ID to every one, then recomp...

Jquery issue with passing function click to function

I would like to push data from mysql db to div every x seconds. at window.setTimeout(update, 60000); - how to pass in the btnStart.click function into it again??? Not too sure about the syntax for passing in function call. Here's the code for reference $('#btnStart').click(function() { $.ajax({ url: "ajax.php", type: "POST...

html page preload & music player

please check out this site: http://www.awdio.com Does anyone know how i could add a preloader(with fade effect) on an html page? i think google has the same effect. What about the music player? it never stops playing while refreshing the page or navigate through the site. How can this be done and not losing stats(page visits-loads)? A...

$(document).ready() not executed for ajax loaded content

What could be reasons not to execute document.ready within returned partial page? It works fine 2 times, but on 3rd time nothing happens after update of html: alert(html); alert($(PopUpItem)); $(PopUpItem).html(html); alert('in set popup html completed'); I have all alerts executed, PopupItem and html has correct values. I am using ...

setInterval stops after Ajax request

I'm using Asp.net MVC and I want my partial view to refresh on an interval, which it does until I make an unrelated Ajax request, then it stops. Here are a few simplified snips to illustrate the problem. in AjaxRefresh.js: function ajaxRefresh() { var f = $("#AjaxForm"); $("#AjaxLoading").show(); $.post(f.attr("action"), f...

jquery ajax call errors in chrome onenter with no responseText

I've built a login page that uses a .ajax call to a generic c# handler (.ashx) to validate the username and password before allowing the user to log in. If you click on the login link <a href="#" class="ui-state-default ui-corner-all CustomButton" onclick="goLogin();return false"> the .ajax call returns successfully and it logs the u...

Print Filenames from Directory w/ jQuery

Is is possible to use jquery to take something like an images directory, collecting the filenames, and then printing a list of links on a page? For example.. An images directory like so: images/one.jpg images/two.jpg images/three.jpg Then printing a index.html file like so: img src="images/one.jpg" img src="images/two.jpg" img sr...

What to return from ASP.NET MVC action to allow jQuery ajax success event to fire?

Right now my ajax posts all fire their Error events even if the action did not cause an error. I have an ASP.NET MVC action that looks like: [AcceptVerbs(HttpVerbs.Post)] public virtual ActionResult StuffToDo(int id) { // do various things that work ... return new JsonResult(); // i have to return something, so this... } On...