ajax

Dynamic image display in asp.net link mouseover using webservice

I have a web page developed in asp.net. The page contains a sections which shows the name of the employees who have recently joined in the company. On mouseover of the link I want to show a panel which should display some more details of the employees viz., Date of joining, department, designation, email address and his picture. I am tr...

Send password safely using an ajax request

Hello, just to know, is it possible to send password through an Ajax request safely? I've a login box that calls an ajax request to try the login/pass and retrieve a JSON Object with errors (if any). Should I use a form redirection instead? [EDIT] Store the encrypted password in the database isn't the solution because the login and p...

PHP+Ajax : Add-a-friend system

I'm trying to make a little project for adding friends. When you click the add friend button you are sending an Ajax call with the friend id & username (they are the id and name attributes of each add button) to the add.php file. (The mysql structure is: 1 users table + X tables named the user's name(columns: friendid, ispending)) In the...

Ajax methods - which is better?

I have a bunch of insert, update, and delete operations I need to execute via Ajax. Which of the following would be a better approach? Individual methods for each function (e.g. delete_foo, insert_foo, update_foo, delete_bar, insert_bar, update_bar, etc.) A "master" method and just pass a parameter to distinguish between operations. ...

How to selete listbox with options in Ajax PHP jQuery

I have 2 tables in my database call groups and players i am trying to select the group first and then the players show up in another listbox. can anyone help me out please. DB Groups id Name 1 Red Group 2 Blue Group 3 Yellow Group Players id name group_id 1 ...

Why is $_POST array empty in PHP after an a request with post data

I make a post request to the the page getremote.php with post data but the $_POST array seems to be empty. Would be grateful if anyone can tell me what I've done wrong. The javascript code to make the request is var postdata = "Content-Type: application/x-www-form-urlencoded\n\nedits=" + this.createEditXMLtext(this.editXMLstruct); var...

fullcalendar not working on hosting server

I'm developing a website with FullCalendar and jQuery. My application works fine and renders events properly on all dayAgenda/weekAgend/month views. But when I run it from the server, it doesn't render events! Also in the current month, it doesn't show anything in month view. For example, If I have an event on 3rd Oct, it shows it only ...

Ajax Polling with 1000 Chat Users

We want to have an ajax call execute every 100 seconds that requests a boolean value from the database that tells the client side if the user is still authorized to ask questions. I'm afraid that even though this is a very small amount of data being requested that it might be too much for the database.. Worst case scenerio, 1000 users ...

jQuery best way to get JSON with ajax

I am developing an eshop and the client wants ajax. I think that this is a bad idea because its going be slow. However while viewing the products there are some filters on the left. When a user selects a filter some other should be disabled. For example there may be jackets for both males and female, but the red colour is only availabl...

Using AJAX When Processing JSP Form?

I am just learning how to use JSP and am stack on a small issue. I am creating a basic form where the user inputs some text and then when they submit the form it gets sent to a JSP page. The JSP then outputs what the user inputted using the request.getParameter() call. Now this works fine but i would like the data to be sent to a JSP pa...

Using php://input and file_put_contents

I'm receiving files (images) uploaded with Ajax into my PHP script and have got it to work using this: $input = fopen("php://input", "r"); file_put_contents('image.jpg', $input); Obviously I will sanitize input before this operation. One thing I wanted to check was the file size prior to creating the new file, as follows: $input = f...

Need a HTML form defined to pass a String back to my MVC app using jQuery ajax?

I have a /mysite/nameprocessor handler that I want to pass a string to using jQuery ajax: <a href="#"><c:out value="${name}"/></a> Do I need to wrap this inside a form and serialize the form like in Prototype, which I think would look something like this: <form action="/mysite/nameprocessor" method="post" onsubmit="new Ajax.Req...

What can be the best Practice for a Rapid Web Application Development?

Hello friends, I am coming up with a web application which will be primarily based on PHP. I would like to know some of the best practices and technologies that I can make use of to come out with the app as fast as possible. My team will be working remotely, so I want to know the best ways of collaborating through web resources too. I'm ...

Need some help with jQuery AJAX request loading a PHP document into a DIV Container.

I need a little bit of help here. First off, I am not sure if i should use the .ajax function or the .load function. I want to grab a PHP file on the server and just load the page into a DIV container. How could i go about this? EDIT: Thankyou for the help. Now I am running into another problem. Here is the code i am using. ...

dynamic element id with php and jquery

Ok this might be a bit confusing, but here goes. Let's say I have a a few select dropdowns on a page. <select id="filter" name="filter[]"> <option value="">-- Select Filter --</option> </select> <select id="load_choice" name="load_choice[]"> <option value="">-- Select Load_choice --</option> </select> ...

Using HTML5 file uploads with AJAX and jQuery

Admittedly, there are similar questions lying around on SO. But it seems none quite meet my requirements. Here is what I'm looking to do: Upload an entire form of data, one piece of which is a single file Work with Codeigniter's file upload library Up until here, all is well. The data gets in my database as I need it. Good good. But ...

Can I capture and save the current state of a webpage using javascript

I need to get the entire contents of a page with javascript and send it to a server script to save it. I want to do this after the user has made some changes to the page using AJAX and other javascript tools. I don't want the state of certain elements. I'd like to essentially get everything inside the body tag so I can pass it to a serve...

Google AJAX API Search - returns only 4 values

Hi Im writing a simple class which I am going to use for some testing. My problem being it is only returning 4 results per search phrase. The output is: foo http://en.wikipedia.org/wiki/Foobar http://www.foofighters.com/ http://foo.com/ http://www.foopets.com/ bar http://www.autorepair.ca.gov/ http://en.wikipedia.org/wiki/Bar_(un...

Using HTTP PUT to send JSON with Jquery and Rails 3

HTTP PUT isn't entirely cross browser so Rails (I'm using Rails 3) supports using POST and passing the _method query param. This is great, but it doesn't seem to work when sending JSON. Example: $.ajax({ url: window.location.pathname, type: 'POST', contentType: 'application/json', data: JSON.stringify({_method:'PUT', p...

auto partial page refresh in asp.net without UpdatePanel

I want to make auto partial page refresh in asp.net. There is UpdatePanel but it sends too much data. So I've found that I can make a webservice and call it by the JavaScript code. But I don't know how to call webservice automatic. There are many examples showing how to call webservice by the button click event: http://www.asp.net/ajax/...