Jump to content
Sign in to follow this  
Leifoet

How display the result of AJAX in an ASP form ?

Recommended Posts

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

 

 

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...