ajax

jQuery qtip - loading an image into the qtip via ajax

I'm using the jQuery qtip plugin. I want the content of the qtip to be an image, loaded dynamically. The url I'm using works. If I go to the url, I see an image. However, the qtip shows something... weird. Here is the result: Any ideas why this would happen? Edit This is the entire Response Header (via Chrome inspector): Acce...

Cannot call webmethod with jquery json

Hi, I use the protocol jsonp to call web methods, but i have this problem: Have this code on the webservice: public class Service1 : System.Web.Services.WebService { [WebMethod] [ScriptMethod] public string HelloWorld() { return "Hello World"; } } And this on Jquery with jason on client side: $.a...

Question about iphone web app and jquery/xml/ajax solution

Here's some background of what i am trying to do: Ok, i am building an iPhone web app. Originally i was building it as one single page (index.php) with each "page" of the site being a <div> element and all of the contents of that page would sit inside the <div>. I originally wanted to create the app this way as one way to utilize JQTou...

Call PHP page via jQuery/Ajax

Let's say I have a PHP page and inside that PHP page I just have <?php echo "Hello World!"; ?> and I want to use JavaScript (preferabbly jQuery) and AJAX to CALL that php page and return it's output (which would be "Hello World!") How is this done? ...

Login and stay on the same page?

I'm trying to make a sleek login function here =) I want the "login experience" to be smooth and seamless, so I don't want the user to "feel" like he/she is being "redirected" and taken back to the same page again. So the process goes: User X visits page A X is not logged in X presses on Login btn (that lives in a in a div together w...

ASYNC postbacks happening when SupportsPartialRendering is set to false.

We're getting a confusing error on two of our pages in our ASP.NET application. Both pages originaly had tags to reload the page every so often if a user sat on it for a while, but opted to remove those in favor of some AJAX flavoring. Specifically, we created timer controls on the page and wired the timer's tick event as a trigger for ...

DOJO or ExtJS ?

These are the Complete Demos for DOJO and ExtJS DOJO http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/themes/themeTester.html ExtJS http://dev.sencha.com/deploy/dev/examples/themes/index.html Which one of them is better - Aesthetically pleasing and performant both ? Also which of them would be a better Candidate for Webkit ba...

Using the output from g.render in Grails controller

Hi, I am rendering two GSP templates in a controller. The first template is rendered as follows: String couponspage = (g.render(template: "availableCoupons", contentType:"text/html", model : [:]))?.toString() I include the results of the first template in the model to the call to render the second template as follows: render(templat...

What to start to learn Ajax?

Hi, everyone, I want to start to learn Ajax, but I don't know how to start to learn and find a good teaching material, can anyone help me? Thank you. ...

ajax source code - good open source project?

Whenever I want to study a new language, the best way IMO is to see how expert writes code in that language, that is always effecient. I am looking for that :) ...

Add form.submit event to make sure that post occurs before form gets submitted?

I have a form. I want to add an event handler using jquery. $("form").submit(function blah() { $.post('ping-me-please.php', params, function (response) { // only submit the form once this goes through! }); } How can I make this happen? ...

How to deny direct access to an xml file in the server

I have an html file index.html (in my server say abc.com) which accesses xyz.js like <script type="text/javascript" src="xyz.js"></script> The javascript file in turn accesses data.xml file. The files index.html,xyz.js and data.xml are in the same folder. How can I deny direct access to xyz.js and data.xml if a user types abc.com/x...

ASP.NET MVC Ajax LoadingELement on loading a page

Hi, I'm looking on how exactly I can show a "loading element" while the page is first requested. Most examples I find, explain on how to show a "loading element" on an Ajax.BeginForm or Ajax.ActionLink... What I'm trying to do is having a couple of dashboards. When the user requests the page, the dashboards are shown immediately, but t...

jQuery.hover with AJAX not working properly

Hey guys, I am struggling with my jquery hover combined with $.post. My goal was to create a bunch of select buttons and if I hover it an image would change(a path to this image would load by $.post). The image would change to its default on mouseout. And if the select button is clicked it would change the image permanently. The i...

Ajax combobox not working in Internet Explorer 6

The dropdown menu are not populating via ajax in IE6. They are working fine every browser except IE6. My snippet of code can be found as follows: function GetXmlHttpObject() { var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); alert('simple'+xmlHttp); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); ...

How to open a pop-up page and render a JSF Response ?

I am using JSF 1.2 without any component libs for a JSF Application. Consider a case where I have a JSF rendered page and on click of a link in that page,a pop-up page should open and show some details which are from the backing bean? What are the options? since the pop up page is just a look up (read only data) , I am thinking to use ja...

How to fix HTML from WCF-webservice in AJAX Client Side-templates

I have a problem with my templates, when I return HTML, it's encoded by default, and I cannot find a way to "fix" it. I want to replace NewLines (\u000a) with a straight <br />, but I always end up with &amp;lt;br&amp;gt; I've tried to fix it with this function: function cleanNewLines(text) { return $("<div>" + text.replace(/\u000a...

problem in creating next and previous pagination links using ajax

Hi There I am using for loop to create pagination links, according to no. of pages directly from database. To get data from database I am using ajax in this pagination. What actually I do is, I create links through forloop and on click of link, call a page containing database connection and get data through ajax script and print ...

Get Random item using jQuery

Just starting learning about ajax requests using jQuery. I've tried looking at other posts on this but not sure how to implement it. Here's the code I have. Right now it's just getting the first 3 items. I want it to get 3 random items from the rss feed it's pulling. Here's what I have: jQuery(document).ready(function($) { $.ajax({...

Jquery nested ajax call remember first HTML response in inner ajax call

Ok. I need to do something like this: 1) Make a GET ajax request and remember the HTML response in a variable. 2) Inside this first ajax request (in the callback function) I need to make a second POST ajax request and append the HTML response to the remembered HTML response from the first request. 3) Replace a div with the HTML from the...