Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

Change HTML content

3 of 419 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Tue 28th Apr 2020, 1:39am
Actions: 
        Login-to-reply

 

Hi
How can i change the content in one html page by clicking a button in another html 
page? Like i have a page with a form for adding user. After i click the submit 
button, it would submit the information form and also add a new table row in another 
page which has a table for displaying the user information.
any help would be appreciated.

Change HTML content

photo
From: Timothy F.
Date: Tue 28th Apr 2020, 9:54am
Actions: 
        Login-to-reply

 

ANONYMOUS wrote:

> Hi
> How can i change the content in one html page by clicking a button in another html 
> page? Like i have a page with a form for adding user. After i click the submit 
> button, it would submit the information form and also add a new table row in another 
> page which has a table for displaying the user information.
> any help would be appreciated.

The general workflow for server side rendering, is:
1. forms, (and POST requests) collect information from users and update a database (the 
persistent data).
2. GET requests serve eitehr static files, or rendered HTML. Rendered HTML changes its 
form based on the persistent data in teh database.

Therefore, when you submit the form, you will probably want to add a new row in the 
database, and when you reload the second page, it will be rendered using objects loaded 
from the database, which will include your new row.

Note, this requires the user to reload the page. If you want the second page to update 
automatically, you will require Sockets or JS sending periodic AJAX requests. We'll 
discuss this later in the course.

Tim.

Change HTML content

photo
From: ANONYMOUS  O.P.
Date: Tue 28th Apr 2020, 4:27pm
Actions: 
        Login-to-reply

 

Thanks Tim
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020