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

1 of 419 articles shown, currently no other people reading this forum.
photo
From: Timothy F.
Date: Tue 28th Apr, 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.

Related articles

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


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020