ajax

Stripping non alphabetic and numeric characters before form submit, using jquery.

i have an ajax form i know i can use like return str = str.replace(/\D/g,''); to strip stuff before submit whats the best way to stop form submit when characters that are not alphabetic or numeric are inputed my the ajax search form is at vitamovie.com/movies ...

Get the url of currently executing js file when dynamically loaded

So I'm trying to load a script dynamically and figure out the URL path at which that script was loaded. So some guy gave me a pretty awesome solution to this problem if the scripts are statically loaded ( http://stackoverflow.com/questions/2255689/how-to-get-the-file-path-of-the-currenctly-executing-javascript-code ). But I need a dynami...

how to lock AJAX calls to ASHX/WCF service to domain to stop data harvest

Hi, Is it possible to restrict the access of an ASHX or WCF service to only AJAX calls from your own domain? In order to improve site performance, we want to use the full jQuery & MS AJAX 4.0 approach however exposing our retail data via an ASHX or WCF service makes it really easier for competitors to harvest our data. Yes it is a pub...

load doesn't trigger ajaxSetup complete handler on complete

Hi. I have // Ajax setup $.ajaxSetup({ beforeSend: function() { $('#general-ajax-load ').fadeIn(); }, complete: function() { $('#general-ajax-load ').fadeOut(); } }); on page load to set loading animation for all my ajax calls. It works perfect, except for load() calls. For loads only beforeSend is triggered, and complete nev...

How can I replace a table with a new one using jQuery ?

Whats the best way to replace a <table> with a new one using jQuery? I'm using ajax on the page to get the new data. ...

How do I display a message only if a certain amount of time has elapsed jquery - prevent form submission

I've got a checkout page which has some ajax calls that update hidden fields when the user changes delivery country for instance. Most of the time, this works fine, the page has time to update hidden fields before the user clicks submit. Some of the time though, due to slow connection or whatever the ajax doesn't return the hidden field...

GWT - how to organize project to have multiple web pages and navigation between them

Hello I'm a newbie to GWT (by the way being really impressed by it) and find it really attractive to a person like me with good knowledge of C++/.NET desktop technologies willing to write web applications. I started my own project based on the generated sample from the GWT Eclipse Wizard. This project generates simple html page with ...

ajax success not triggered in firefox

Hello all. I have a strange problem that I cant' solve after hours of googling. The way my web application is built is not very optimal, but I can't do anything about this right now. I have made a User Control in C#. This usercontrol is hosted by a aspx-page that are inside an iframe and this page is inside a frame again. (Not optimal)...

Cannot access data from jquery ajax request, returns empty array

Hi, I have a form that is called via the fancybox plugin http://fancybox.net/blog - login example Here is the code I have: Form: <form method="post" action="" id="events_form"> <p class="clearfix"><label for="Name">Name:</label> <input type="text" name="Name" id="Name" /></p> <p class="clearfix"><label for="Company">Company:</l...

How do I shorten this load jQuery?

I'm pretty good with jQuery but when I get to stuff like this I need a little help. So I want to shorten this code: $(function() { $('#experience_nav').click(function() { $('#contentWrap').load('files.html #content_experience', function() { $(this).hide().fadeIn(); $('#content_experience').siblings().fadeOut(); ...

ajax request changing url

Hi, I have a pager on a table using ajax and I would like each such request also to change the browser's url, so when I hit refresh button I won't skip back to first page. I was fighting the Url parameter of AjaxOptions, but it keeps winning over me. Please help. Trim ...

Can't jqeditable after appent an element for it.

Hi! I wrote a script, to make a new element to my SQL db and my website. If the post is good, i will get back the ID of the post, so i can make a DIV box like the other DIVs. The problem is, I can inline edit the texts in all of the DIVs but NOT in the created one. ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyS...

Twitter like Form Submission using Ajax or Jquery

I need a simple example of form submission very similar to Twitter. How you type in a comment and click update and without the whole page refreshing, the comment gets added below on top of the rest of the comments. I would prefer something in Jquery as my PHP project is already integrated with it. ...

how to select input field in listed form with jquery

Hi, I got several forms listed through a loop at one page such like this: (extract) if(mysql_num_rows($r)>0): while($row = mysql_fetch_assoc($r)): ?> <form id="myForm" action="save_fb.php" method="post"> Title: <input type="text" name="fb_title" value="<?php echo $row['fb_title']; ?>" /><br> <a href="javas...

Ajax Toolkit in Control Jquery

<script language="javascript" type="text/javascript"> $(document).ready(function() { $("#TextBox1").click(function() { alert("bla bla bla bla bla") }); }); </script> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:TabContainer runat=...

Give the JavaScript the button's id.

In my JavaScript code, I have to make a line like this (I use smarty template engine, that is the literal stuff). <script language="javascript" type="text/javascript"> function ajaxTextKill() { // ...etc. ajaxRequest.open("GET", "functions.php?action=kill{/literal}&id="+IWANTMYIDHERE+"&p={$smarty.get.page}&c={$smarty...

Using Ajax with dynamic Fields

Hi Guys, Im working on a project currently and really using javascript, Jquery / AJAX heavily for the first time and have run into an issue. Ill do my best to explain it but an example which has all the key parts can be found here http://mail.diskbank.com.au:8080/kieran/AJAX-test.php Basically i have a quote form where people can dyn...

Jquery $.ajax() call to webmethod

Hi, I have never before used the $.ajax() and if you see any mistypes let me know ;) Im using jQuery $.ajax() to call a webmethod with JSON. The simple definition of the webmethod should look something like this: [WebMethod] public static bool MyMethod(string a, string b, string c) { ... } The value for the data parameter in $.a...

jQuery: Wait for entire page--including ajax--to load?

I'm using some jQuery tabs that load their content via ajax. I'm using $(document).ready() in conjunction with the following code: // Hide loading animation, show content container $("#content").show(); $("#loading").hide(); The purpose is to wait until the page is fully loaded, then show the content and hide the loading animation. H...

jquery ajax php recordset caching

Hi, I currently have a jQuery/ajax request which produces a recordset which appears in #contentDiv on my page. The user can then browse the results and view further details of an item. Once on the page for the item it the user hits back on their browser they return to the default page for my search without their generated search resul...