ajax

Page is reloaded after ajax based client callback to WCF

Exact duplicate of http://stackoverflow.com/questions/2302382 Ive set up a basic client side callback to a WCF service. see sample code below. when viewing using an http filter attached to the explorer you can see that: 1. service1.svc/js is working fine and return proper java script to the browser 2. serrvice1.svc works and retu...

CakePHP Jquery Ajax Progress Indicator - Update DIV

Hi, I have what should be a simple requirement, however, I am keen to get an opinion on the best solution. Firstly, I am using CakePHP and JQuery on a LAMP dev server. The site uses a simple search form that submits data via GET to /search?term=xxx The search logic implements a number of time consuming calls to multiple third party A...

Ajax modal popup with repeater control

hi I created a repeater it has a column called comment on click of a comment icon, a AJAX Modal Popup comes out were user can enter the comments, now the problem is AJAX Modalpopup comes out and disappear immediately , i dont know wats wrong in that when i make targetcontrolid attribute of AJAX modal popup pointing to a button it wor...

Ajax data two-way data binding strategies?

I'd like to 1) Draw create form fields and populate them with data from javascript objects 2) Update those backing objects whenever the value of the form field changes Number 1 is easy. I have a few js template systems I've been using that work quite nicely. Number 2 may require a bit of thought. A quick google search on "ajax data bi...

why is this ajax call not reading my internal php?

Hi folks, Too many edits to keep track of, but I have simplified the issue. I have this code in my index.php: <div class="calendar_top"> <?php include(SITE_ROOT . "/includes/sub_top_divs.php"); ?> </div> <table class="tablebodycontainer"><tr><td> <?php include(SITE_ROOT . "/includes/view-monthly-calendar-ajax.php"); ?> </td></t...

JQuery - Ajax return HTML wont allow further Jquery functions?

Hi, Kinda New to Jquery and hit an issue regarding returned HTML. I am using the .load() function to load HTML returned from a jsp file - its all working grand except the returned HTML doesnt seem to allow further Jquery functions to be called on it. i have a click and toggle combination running for "#showgame" - this id is in the ...

ajax and multiple check boxes

how to display multiple checkboxes value in ajax language? ...

weird ajax behavior-commented code breaks the request?

I don't understand this. I have an innerHTML request. <a href="javascript:void(0)" onclick="getData('/includes/hello.php', 'targetDiv')"></a> <div id="targetDiv"></div> One of the includes is: <?php echo ("Hello, world"); ?> and works fine, but if I do: <?php echo ("Hello, world"); ?> <!-- lots of code I'm trying to debug --> ...

How to execute PHP and SQL sessions inside Ajax?

I've been asking similar questions here today, but I'm seeing I think the issue is with how I am calling my data? I'm trying to replace a nav bar with ajax that will load contents into a div. The nav bar is this: <ul> <li><a href="javascript:void(0)" onclick="getData('/includes/view-monthly-calendar-ajax.php', 'targetDiv')">Monthly<...

How to update Select menu with AJAX w/out <div> inside form

Hey all, I am using an ajax call to update a select menu. The ajax call puts the list into my select menu by running from a different .php file. Here is the JS insertion snippet: if (req.status == 200) { document.getElementById('countydiv').innerHTML=req.responseText; } else { alert("There was a problem while using XM...

Remove ajax scripts from html output ASP.net

I am talking about the WebResource and ScriptResouce js files that are added to the page html. They are quite big. On some pages I don't need them, so it is safe to remove them. It would seem logical just to remove the scriptmanager, however this is not an option. Some pages use ajax based on a query string. and i use an update panel to...

JQuery Ajax call

I have a url like: http://localhost:8080/myapp/discussions/voteup?id=1 which returns the following json: {"vote":{"value":"100"}} I am trying to make a JQuery Ajax Call to post a vote to the url. $(function(){ $(".vote-up-post").click(function() { var postId = $("#postId"); alert("Post Value" + postId.val()); ...

Can't submit form automatically for Incremental page load in ASP.NET MVC

When I submit form using button it works fine (renders PartialView in the menuload div): <% using (Ajax.BeginForm("Menu", null, new AjaxOptions { UpdateTargetId = "menuload", HttpMethod = "POST", LoadingElementId = "status-waiting" }, new { @id = "menuFormControl", enctype = "multipart/form-data"})) { %> <input id="m...

Upload file and parameters with ajax request, pure javascript or prototypejs

Hi, I want to upload a file using an ajax request var xhr = new XMLHttpRequest(); xhr.open("POST", "/photos"); xhr.overrideMimeType('text/plain; charset=x-user-defined-binary'); xhr.sendAsBinary(bin); Works fine, but I want to post a parameter with this request ie: token=abc123 How can give a parameter to this request? this is pu...

Ajax Reload same page onclick

Hi, This is my situation.I have some 10 links on a page. So when user clicks on those links ajax-same page reload must take place. To be clear I have something like this. <a href="test.php?name=one">one</a> | <a href="test.php?name=Two">Two</a> If javascript is enabled, Onclick, ajax load must take place. If javascript is disable...

how to make javascript functions together?

Hi Below is the JavaScript code I use in my HTML page <script type="text/javascript"> function loadXMLDoc(HTTP) { var xmlHttp; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { ...

Javascript synchronous AJAX timeout

My Javascript needs to send some data to a server when the page closes, which I currently do with a synchronous AJAX (SJAX?) request in window.onbeforeunload. The problem with this, of course, is that if my server takes too long or the network connection dies, the browser freezes. From what I've read, it's not possible to specify a time...

AJAX and JavaScript

Im having an issue with the request below, for some reason I can seem to get the XML to display? I've checked the URL and it displays fine, so im wondering whats going on?! Could anyone give me a hand? There should be something in the ResponseText not "NULL". var url = "https://services.lexel.co.uk/paf/"; loadXMLDoc(url) function lo...

Paperclip and xhr.sendAsBinary

Hi, I use paperclip to add a file to my model. I want to use the new feature of firefox 3.6, xhr.sendAsBinary, to send a file with an ajax request. Here is how I build my request : var xhr = new XMLHttpRequest(); xhr.open("POST", "/photos?authenticity_token=" + token + "&photo[name]=" + img.name ...

Creating HTML: PHP server-side vs. jQuery client-side

This is a design question. I have data that needs to go into an HTML table, which will later be manipulated by the user. Basically the user will be able to select items in the table rows. I have two options - in both cases I'm using AJAX to get the data: Create the HTML code using PHP on the server side, send it to the client as HTML....