   Ajax coder
Brief description:I am looking for an ajax coder to alter a page of mine where by the submit buttons will run the sql query but not refresh the page.. nothing other than than, probably takes no more than a couple of minutes to do aswell.Talent needed:Ajax coderWebsite:Website is currently offline but will be able to show you the page via localhost.Contacts:Please contact me either in this thread or by messages on the forums.Call me Dave by the way.Thanks for reading.   
  Bump   ;  bump   ;  Hi Dave, Using AJAX is super easy if you use a library like jQueryHere's an example of how simple ajax can be:<html> <head>  <title>My Ajax Sample</title>  <script type="text/javascript" src="jquery-latest.min.js"></script>  <script type="text/javascript" src="jquery.form.js"></script> </head> <body>  <!-- the form, design it as usual, nothing special needed here! -->  <div id="container">   <form action="Data.aspx" method="post" id="theForm">    <p><label for="q">Enter data:</label> <input type="text" name="q"/></p><button type="submit">Go!</button>   </form>  </div> <script type="text/javascript">  // this function is executed as soon as the page is completely loaded  $(function(){    // AJAXify the form. When submit is clicked, the data is sent to the action url and// the "container" div will be replaced by the response    $("#theForm").ajaxForm({target: "#container"});  });  </script>   </body></html>That's all regarding the client side. The server side (here: data.aspx) has to handle the submitted data (execute database queries etc.) and returns the HTML that is to be inserted in #container. With this info, maybe you can manage to apply ajax to your form yourself. Regards, Andre   ;  Thanks for your reply.jQuery is currently installed but the language is alien to me even the logic is hard to read and just see what it is doing like mysql and php is. Most of the &#106avascript i have on the site, which isn't much was done from help.I'm sure its a simple task to as an ajax coder but to me it would be a year learning the language just for something so little to be implemented. Given there are slight complications which my level of ajax language would take me ages to know the solution. Which a ajax coder would probably have the answer straight away.My purpose for it to be implemented is to reduce page loads and thus server load is reduced. As there is one page which is to be viewed countless times per day by a single user, this will increase alot of server load.;  I have the feeling that you are a bit confused about what AJAX is. AJAX is no language and AJAX has nothing to do with databases. You don't query a server side database from &#106avascript code. AJAX is a term for a &#106avascript based technique to post to or request a web resource from the server asynchronously, i.e. in the background while the user is using the page. Thanks to the HTML document object model and &#106avascript you may use the result of such an AJAX request to update a part of the web page. The server side part (querying databases, enforcing business rules etc.) stays on the server and does not change when using AJAX wrt a "normal" request.Here's a comparison between a normal version of a web form and an AJAX version.Normal request:- User enters address in address bar- Browser issues a request to the server asking for that page- Server returns fully rendered HTML page- User enters data into a form and clicks on submit- Browser sends a request to the server containing all form data - Server processes data and returns a complete result page in HTML- Browser replaces whole page with the HTML code it got from serverAJAX request:- User enters address in address bar- Browser issues a request to the server asking for that page- Server returns fully rendered HTML page- User enters data into a form and clicks on submit- A piece of &#106avascript uses the XMLHttpRequest object to send the provided data to the server (this won't cause a page refresh)- Server processes data and returns a partial page in HTML- A piece of &#106avascript replaces  a part of the page with the HTML code it got from serverThe bold part is the only thing that changes.Note that the whole "replace a part of the page with the result of an ajax request" thing is actually not part of AJAX anymore, it's just client side HTML modification which can be done without any AJAX request.So, what I want to say: do you only need someone who adds AJAX support to your application's client side or do you actually need someone to write the server side stuff (SQL queries etc.) for you?BTW. whether you use AJAX or not won't have influence on the number of requests your server has to handle. It is true that AJAX requests that replace "full" requests with partial page updates can reduce traffic. On the other hand the request has still be handled on the server, so all the database queries still have to be done. Whether using AJAX reduces server load depends on how much it would have cost to generate the part of the web page that is not returned by the AJAX request. If you load ads, user data, "latest forum posts" etc. from a database every time you generate a page, AJAX can help you to reduce server load (because those parts can probably be skipped for a partial page update). What's probably more important is to make smart use of server side and client side caching. An example for server side caching: instead of adding ads from a database on every page request, cache the results for a minute or so and use this to serve all requests. Or: instead of loading the user name from database on each request, store it in a session (or even in a cookie). Examples for client side caching (ie. through HTTP headers): make everything that won't change too often cacheable by using the proper HTTP 1.0 and 1.1 headers (expires, etag, cache-control, last-modified). Return 304 for stuff that hasn't changed.;  Umm well i am unsure what one is going to relate to me here..but the idea of what i needed to update was:Imagine a page which has :X : 0  Y : 0Then 4 submit buttons. Now depending on them four buttons will change the X and Y accordingly, like a user exploring some kind of area. Now every time this runs a few things are checked.. firstly if the location has a hidden item meaning the user found an item, also if a user is in same location as another location thus load the list of users in same location. And if the user has reached a main city or not.As the page will refresh every time the user changes X or Y this is going increase the amount loaded..so it becomes a problem when I have say over 1000 users all doing it, thats going to be easily up to 500,000 page refreshes or more per day. Which is going to kill my server quicker than I would like.So some one told me using ajax can reduce the page reloads whilst still executing the script when ever the user travels. Which will reduce the server load.   ;Quote:Original post by VizOneI have the feeling that you are a bit confused about what AJAX is.Which is exactly why he isn't comfortable trying to do this stuff himself. You're right, it doesn't work quite the way he describes but that's normal when someone not so technical tries to describe what code is doing.;  So it won't reduce server resources being used in the slightest? Cos i was told it could do..   ;Quote:Original post by d000hgWhich is exactly why he isn't comfortable trying to do this stuff himself. You're right, it doesn't work quite the way he describes but that's normal when someone not so technical tries to describe what code is doing.I didn't want to be offensive, I hope Dave did not take it as an offence. I was under the impression that Dave was developing the web site himself but only needed help with the AJAX part. So I thought that if he saw that it isn't that hard he might want to do it himself.But back to topic: I think that using AJAX is a reasonable decision in your situation. As mentioned above, while using AJAX won't necessarily reduce your CPU and I/O load dramatically on the server (because the core processing has still to be done) it is certainly beneficial for a) bandwidth use (less data transfer)  and b) user experience (better responsiveness). Just for fun I set up a minimalistic prototype of what I think you're trying to achieve: look here. You can click the buttons to "navigate", which sends an AJAX request to server to update it's internal state. The server responds with the stuff that is shown under "From server"If you look at the source code you see that there is not much code involved on the client side. The server is handling updates of the data etc. I have to ask again, because that's not clear to me: are you asking for someone who writes the AJAX part or do you need help with the server side part as well?