In MVC, how do I return a string result?

In my AJAX call, I want to return a string value back to the calling page. Should I use ActionResult or just return a string?

jQuery Progress Bar Not Working

I am a jQuery novice and I am trying to build a dynamic jQuery progress bar. What I need to do is offer a series of checkboxes on a page so that when the visitor checks or unchecks a checkbox it...

How to disable submit action

Hi i have have this form that i do no want to perform an action when the submit button is clicked. All i want to do is perform the a function that loads data into a div. Any Ideas?? <form ...

Ajax JQuery to Spring @RequestBody? How do I pass data?

Ajax JQuery to Spring @RequestBody? How do I pass data? I being doing spring for sometime now with passing form fields but I am working on a new system and we would like to use Ajax and RESTful...

Required field validator is not working in update panel

I have a textbox and a button control in a panel which is in update panel. I want to validate textbox if it is empty on button click. Actually this panel is using for Modal Popup Extender...

Passing Javascript Array to C# Code Behind using Ajax POST

I am trying pass javascript array to C# code behind using ajax post back. but When I try this It didn't work. I have attached My code below. Can any one please help me on this?? test.aspx <%@...

Submitting a form with ajax in Wordpress

I am trying to get the results of an ajax request in wordpress, but I am getting result of '0' in an alert box of javascript, so the form looks like this: <form class="form" id="ajax-contact-form"...

how to make a chat box like facebook using ajax, jquery and php

See I have made almost the chat box with only 2 problems. I don't know how to solve them. I'm trying hopeless methods to make it correct but it just won't work. I will explain my code...

ajax and “Uncaught ReferenceError: data is not defined”

In Chrome console, the message error is : Uncaught ReferenceError: data is not defined function list(){ $.ajax({ type:'POST', url:'adeneme.php', ...

Update data on a page without refreshing

I have a website where I need to update a status. Like for a flight, you are departing, cruise or landed. I want to be able to refresh the status without having my viewers to have and reload the...

jstree : Uncaught TypeError: Cannot read property 'children' of undefined

In my server I am returning a JSON object in the format of jsTree : {"id":"value", "text":"value", "parent":"value"} I am getting it in my view through an Ajax call. Console.log shows me the...

Upload form with image in codeigniter using ajax

I'm trying to upload a form with a file field in CodeIgniter. I successfully insert the form data without file to database. But it shows the error below when I try with the file field `<p>You did...

How to prevent AJAX polling keeping Asp.Net sessions alive

We have a ASP.Net application that has been given a 20 minute sliding expiry for the session (and cookie). However, we have some AJAX that is polling the server for new information. The downside...

How to send data in json format in jquery ajax for restfull web services

I am sending the json format data in jquery ajax for restful web services but It is not sending. I am new in web technology, so please help me. I write the script for sending the JSON data using...

simple AJAX JQuery example gives me 500 internal server error

hi i'm working in a spring mvc project and i'm getting this error when i hit the button in my form 500 (Internal Server Error) ...

HTML5: Refresh page when popstate is fired

I have a ajax search-form like: url: /search/ => User enters a search-term and clicks a button => search is done and shows the results via ajax in a div on the page But: I also want the user to be...

AJAX Form Post - Not Passing Data

I have a form that that is not being passed to my controller. It is hitting the controller method, but fails in passing any parameters, 'jsonString' is always NULL. ** Note: I have also tried...

How to create and Download Excel File by using Ajax request

I want to create an Excel File, if the user pressed a formular button on my webpage. My first solution works fine. The User pressed the button, the serverside java code creates the file and after...

How to reload a page after clicked ok using sweetalert

Hello I have a code using sweetalert swal("Good job!", "You clicked the button!", "success") this code will pop-up a message and has a button okay, what I like to do is I want to refresh the page...

Event Handler to run only when previous event handling is complete

Attached Event handler to callback like : $("someSelector").on('click',callBackHandler); function callBackHandler(){ //Some code $.ajax({ //Ajax call with success methods }) } My...

React extremely slow when iterating through JSON

So, Im trying to fetch an JSON API with fetch() and iterate through it and render it in Reactjs. It does actually work pretty well with small json lists up to 100 items. But when I try the same...

How to refresh page after all ajax calls finish?

Here is my jquery function below. I need to refresh the page so I can display the additional columns after they have checked which columns to display. Currently with the code (location.reload())...

Replace the table body using DataTables

I'm new to using DataTables and I'v been struggling to change the body of my DataTable. I have been looking at the API and searching the forum but I could not find anything. The API has a function...

PHP flush loop with Ajax

Sorry for duplicate question, but the given answers do not work for me. So far I use Ajax to execute PHP after a button click and ob_flush() to flush out the echo() one after each other. However I...

fullcalendar: how can i get the first and last day of the relevant viewed month (and not the days of of the prev \ next month)

i want to know what is the first day and the last day of the main month viewed in fullcalendar. here is the relevant month view: events: function (start, end, timezone, callback) { //custom...

AWS S3: should I use POST or PUT requests to upload a file?

I would like to know the pros and cons of using POST or PUT request to upload a file to Amazon Web Services S3. I've already read some SO question like this one, but I would like to know the...

ajax - incremental load of elements from one file

I've got an index.html with a container in which I want to load content via ajax on click. It looks like this: <div id="loadcontent"></div> <div id="more">Load More</div> And there's only one...

Python Falcon CORS Error with AJAX

I've read multiple SO questions on this error, but none of them seem to be helping me resolve this issue. The Falcon server isn't even printing out the print statements of the on_post method...

POST method to send form data with AJAX without JQUERY

I have a script in js that sends the form data from one page to the server and it works well with a Jquery function but I would like to be able to do it without the use of Jquery. When I try...

CORS not working for calls from Ajax to ASP.NET Core Web API

It throws this error on the Ajax call. I also tried these lines in Startup.cs with named policy. None of the ways that I found online, works. I'm sure I'm making some silly mistake somewhere, I'm...