Leifoet Posted May 14, 2016 Share Posted May 14, 2016 I use 2 forms FORM 1 = input name => AJAX retrieves (from the database) the emailadress corresponding with the name FORM 2 = processing of the data of FORM 1 - method="post" => sending the data in an email to the retrieved emailadress and inserting the data in a database table => sending email + inserting work fine. I used the AJAX-examples from W3School AJAX Database getcustomer.asp (= separate .asp-file) My problem : How can I display this result of getcustomer.asp (= the little table : response.write X.name ... X.value) at any desired location on the screen / on a webpage ? At the moment the table comes always on the top of the screen (in my FORM 1) and not below the input field of the name, where I want it. How can I become this - what code do I use ? Thanks for help - Leifoet Link to comment Share on other sites More sharing options...
justsomeguy Posted May 16, 2016 Share Posted May 16, 2016 Look at the example on that page, the onreadystatechange function tells it what to do with the response. It uses an element's ID to find where to put the response. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now