The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dropdown box auto populates other input fields - Help
#15
you could use ajax for that, i use this for form submission but you could adapt it for use with on change, your php logic can go into a separate php file making sure to incl. init.php and $db = DB::getInstance();

<pre>
Code:
$('#form-id').submit(function(e){
  
        e.preventDefault(); // Prevent Default Submission
      
        $.ajax({
          url: 'path-to-php-file',
          type: 'POST',
          data: $(this).serialize(), // it will serialize the form data
          dataType: 'html'
        })
        
        .done(function(data){ // If success display alert
           alert('Form Submit Successful ...');
        })
        
        .fail(function(){ // If fail display alert
            alert('Form Submit Failed ...');
        });
        
    });
</pre>


maybe that helps a little
  Reply


Messages In This Thread
Dropdown box auto populates other input fields - Help - by firestorm - 05-09-2017, 07:41 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)