|
There are two ways to create this kind of interactivity:
- Using client-side scripting to change interface behaviors within a specific web page, in response to mouse or keyboard actions or at specified timing events. In this case the dynamic behavior occurs within the presentation.
- Using server-side scripting to change the supplied page source between pages, adjusting the sequence or reload of the web pages or web content supplied to the browser. Server responses may be determined by such conditions as data in a posted HTML form, parameters in the URL, the type of browser being used, the passage of time, or a database or server state.
|
Client-side
The Client-side dynamic content is generated on the client's computer. The web server retrieves the page and sends it as is. The web browser then processes the code embedded in the page (typically written in JavaScript) and displays the page to the user.
The inner HTML property (or write command) can illustrate the "Client-side dynamic page" generation: 2 distinct pages, A and B, can be regenerated (by an "event response dynamic") as document. Inner HTML = A and document. Inner HTML = B; or "on load dynamic" by document. Write (A) and document. Write (B). |
Server-Side
- The browser sends an HTTP request.
- The server retrieves the requested script or program.
- The server executes the script or program which typically outputs an HTML web page. The program usually obtains input from the query string or standard input which may have been obtained from a submitted web form.
- The server sends the HTML output to the client's browser.
|
|