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


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

Change HTML content

1 of 419 articles shown, currently no other people reading this forum.
From: Timothy F.
Date: Tue 28th Apr 2020, 9:54am



> 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.


Related articles

Change HTML content (all 3) RSS
├─ original   Tue 28th Apr 2020, 1:39am, ANONYMOUS
├─ THIS   Tue 28th Apr 2020, 9:54am, Timothy F.
└─ reply 2   Tue 28th Apr 2020, 4:27pm, ANONYMOUS  O.P.
This Page

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