Assignment 4 — Writing Scripts
Open platform programming
- Client-Side Scripting is implemented within a website to add functionality, user interaction and behavioral changes to the website.
- The main point of using Javascript is to allow changes to happen within the website based on events that the user causes, this could include something as simple as the user clicking a button on the website and a message box appearing or the website changing based on information that is collected from the user computer for example automatically detecting the the time/language.
- The only protocol that is used for the website that i have created will HTTP.
- The differences between Server-Side Scripting and Client-side Scripting are reasonably straight forwards. Anything that is done of the clients machine is considered client side (For instance have a chat message pop up when a button is clicked), Server side how ever is something that the server is required to perform (For instance, the user inputs some information and and then clicks a button that has the server run server side scripts to send an email on behalf of the user).
- Programming standards vary depending on the programming language that you are using. The most basic requirements are that you try to ensure that your code is neatly written and has comments describing what the intended purpose of the code is(It does not need you to say how the code works because you should be able to gather that from reading the code itself).
Below are the two major scripts that I am using within my website, The first was completely written by myself and allows the user to calculate how they will be spending, and gives a discount if they have brought more than 4 items from the shop.
The second is a script that I have implemented after some research and is being used to ensure that the user can only input Numbers into the input box’s. How ever this only works on key strokes and still allows the user to copy and paste and I have not found a fix for this.
The final piece of Javascript/Jquery that my site is using is a tool called fancybox. This allows me to create my gallery and have a large amount of control over how my pictures are displayed, including a hover to enlarge image, click to full screen an image and have a description for each separate picture.

