1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

how to display data which is get from data base in html bage using ajax

Discussion in 'Meet and Greet' started by palmyra, Jul 4, 2010.

  1. palmyra

    palmyra New Member

    I am working now on Graduation Project with Php and ajax
    I have a problem with php
    the problem is
    I have a form which has input fields the user can input values in these fields to apply some operation on them
    and he can save the form values in the database and he can load values from database
    i did the save operation by use java script and save values in database
    but when i worked with load operation i could get values from database to the java script but i didn't know how to fill this values in the form by ajax because i don't want to refresh the page

    this is the javascript which return the data
    the data is array of values that i want to fill it in the form
    function load_parameters()
    {

    var val1 = document.getElementById("profile_name_select").value;
    $.post("?rt=saveload/load",{profile_name:val1} ,
    function(data)
    {
    document.getElementById("test").innerHTML=data;

    alert(data);
    });
    }
     

Share This Page