AJAX functions to update page elements: I need to be able to use a set of generic AJAX function calls

Recommend this page to a friend!
  All requests RSS feed  >  AJAX functions to update page elements  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

AJAX functions to update page elements

Edit

Picture of Jon Slack by Jon Slack - 6 months ago (2020-05-20)

I need to be able to use a set of generic AJAX function calls

This request is clear and relevant.
This request is not clear or is not relevant.

+2

Most of the AJAX classes here take care of the form generation for you and I don't want that. I have my own forms (company template) that contain fields to be individually edited. I need a set of plug-in AJAX functions (GET RECORD, UPDATE RECORD, CREATE RECORD). I am looking for something that onchange=function() UPDATES the field for the current record, regardless of the fieldname or value and manages the record-retrieval for Next and Previous buttons.

Due to the COVID 19 pandemic I have been tasked with migrating Medical Researcher's Access databases to SQL and with Web Front Ends (so they can research from home and access their databases without using RDP). I can do PHP and MySQL - just struggling with AJAX.

  • 3 Clarification requests
  • 3. Picture of Jon Slack by Jon Slack - 6 months ago (2020-05-23) Reply

    Hello, and many thanks for your earlier response. I have had a chance to look it over and, whilst I could find it very useful, it requires the user to submit the form, and I need it to update when the data in the field changes.

    The problem is this: I have a page with several tables, each filled with editable data. When data changes in one table, it has a 'knock on' effect on data in one, two or more of the other tables. I need all of the affected tables to update when the change occurs (user chooses a value, or enters one).

    Is this even possible?

    • 4. Picture of Manuel Lemos by Manuel Lemos - 6 months ago (2020-05-23) in reply to comment 3 by Jon Slack Comment

      Hello Jon,

      Sorry that JavaScript component lacks of proper documentation.

      Since I am the author of that JavaScript component, I can clarify that you can use the JavaScript object loadContent function to communicate with PHP running the server using a regular GET request via AJAX.

      So you can do all you need with loadContent function.

      Just let me know if you need help using that function.

    • 5. Picture of Jon Slack by Jon Slack - 4 months ago (2020-07-22) in reply to comment 4 by Manuel Lemos Comment

      Hello Manuel. Please accept my apologies for the delay. I have been redirected to another project until the middle of August. I'll be back on this after that concludes.

    • 6. Picture of Manuel Lemos by Manuel Lemos - 4 months ago (2020-07-23) in reply to comment 5 by Jon Slack Comment

      Sure. Take your time.

  • 2. Picture of Jon Slack by Jon Slack - 6 months ago (2020-05-22) Reply

    Thank you for your response I do appreciate it. I'm far more comfortable with PHP than JavaScript, but will give it a go.

    • 1. Picture of Manuel Lemos by Manuel Lemos - 6 months ago (2020-05-22) Reply

      AJAX in reality is JavaScript. If that is all you need, you may want to try this JavaScript package as it does on the browser side what you need.

      https://www.jsclasses.org/package/353-JavaScript-Load-HTML-and-submit-forms-using-AJAX-requests.html

      Would you like a solution that would handle AJAX request using PHP?

      Ask clarification

      1 Recommendation

      PHP Forms Class with HTML Generator and JavaScript Validation: HTML forms generation and validation.

      This recommendation solves the problem.
      This recommendation does not solve the problem.

      0

      Picture of Manuel Lemos by Manuel Lemos package author package author Reputation 20090 - 4 months ago (2020-07-07) Comment

      You can try this HTML forms generator class that can generate JavaScript automatically submit forms using AJAX requests and you can write PHP code to handle the responses.

      Here you can also have a live example of AJAX form submission with progress report of server site activities during form processing. Just click on the window to open in a separate link:

      https://www.phpclasses.org/package/1-PHP-HTML-forms-generation-and-validation-.html#demos/6486


      Recommend package
      : 
      : 
      For more information send a message to info at phpclasses dot org.