Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Essay

Unit 20 - Assignment 2 - P3, M2, D1

Beoordeling
3,3
(10)
Verkocht
22
Pagina's
19
Geüpload op
01-02-2018
Geschreven in
2016/2017

Unit 20 – Customisation of web page, P3 - Explain the fundamentals of a scripting language, M2 - Discuss how a scripting language can improve functionality, D1 - Explore how web pages using scripts are implemented in different browsers

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

Roland UDVARLAKI


Unit 20 – Customisation of web pages

Introduction:

P3 - Explain the fundamentals of a scripting language

What is a scripting language?

Scripting is a high-level programming language that is executed by another program in order to make
it work/run e.g.: a browser. This makes it avoid using the computer’s processing power (such as CPU).
Scripting languages can be used within the HTML code to add additional functionality to a webpage
such as: graphics elements, advertisements, and other dynamic elements etc.

How does it work on a webpage?

Scripts are usually embedded within the HTML code on a webpage. This is usually placed within the
head tag (<head>)which then consists the script tag (<script>):

<head>
<script>
SCRIPT CODE HERE
</script>
</head>

Scripting languages can be object oriented or event driven languages. Object oriented languages are
broken up into little pieces of objects. Each object has its own job and purpose, so they’ll be able to
interact with others.

Meanwhile event driven languages are broken into events. Each and every one of these events
contain a single action that could be a press of a button key, click with a mouse, a movement or data
transferring. The action will take place when they are being executed by the user.

Objects:
Object is a data type that knows itself very well, this is also called (properties), and it also knows how
to do certain things called (methods).
An example for JavaScript, string object would be the following:

<script>
hw="Hello World"
document.write(hw.length)
</script>

The output for this String would be 11 characters as it also counts the blank spaces inbetween, so the
length of content that is placed inside the apostrophes will make up to the “hw” string.

Methods:
Each object has its very own method that knows exactly what it can execute.
An example for JavaScript, string object would be the following:




Roland UDVARLAKI - Unit 20 – Assignment 2 – P3, M2, D1 – Page 1 of 19

,Roland UDVARLAKI


<script>
hw="Hello World"
document.write(hw.toUpperCase())
</scipt>

The output that is going to be displayed on the screen is going to be “HELLO WORLD” as the
“toUpperCase” has forced all of the text elements to be output in upper cases.

Handling events:
Events are action that can react to a piece of code that is placed inside the HTML code. Events can be
executed by getting something in the focus, called (onfocus), or when the focus is lost (onblur), when
a page loaded in (onload), when the mouse hovers over something (onmouseover). All of these are
used within the HTML, body tag.

-Onfocus event example:
<form>
<input type="FOCUS" onfocus=" alert('An onFocus event') "
</form>

-Onmouseover event example:
<img src="example.gif"
onmouseover=alert('This is an OnMouseOver Event')"

-Onload event example:
<body onload=alert("loaded")>

Hiding Scripts:
Some older browsers and older browser versions may not support some scripts and scripting
languages. This can result in webpage errors and other issues leading to an unusable website. To
prevent this, web creators usually put these scripts in the comment section.
Example for this:

<script>
<!--
SCRIPT MUST BE INSERTED IN HERE
//--!>
</script>

So, the browsers that support the script will simply show what’s shown inside the <script> tags,
however the browsers that cannot display the script will simply ignore it, due to the fact that it’s
been placed inside the comments in the HTML code.

Security:
When talking about client-side scripting, there’s always a chance that the user’s computer will get
affected by a virus when simply browsing the internet. This is because all client-side scripting
languages run on the users machine instead of a server, which then is able to open up various entry
points for viruses. When reading/writing from and to a website, both the client's and the user's
computer can get affected by a virus. Website owners who place viruses on their websites are able to



Roland UDVARLAKI - Unit 20 – Assignment 2 – P3, M2, D1 – Page 2 of 19

, Roland UDVARLAKI


gain access to a user's computer without any authorisation. The hacker then is able to do various
things, such as: do data mining, open applications on the user’s computer, read files and browser
windows etc.

What type of script languages are available?

There are various scripting languages available for the users and developers. The most popular ones
are: JavaScript (Client-side), PHP (Server-side), Python, Perl etc.

What are the main features/uses of scripting languages?

Scripting languages can give a brand new look and interactive features to websites. Most modern
websites have at least 1-2 scripts on their pages that include some extra functionality for users.

The main uses are:

Alerts: Alerts will notify the users about
something such as: notifications, actions
etc. These alerts usually show up on the
bottom top centre, left right corner of the
browser or on the bottom centre, left, right
corner.




Confirming choices: It’ll provide a feedback
for the user after executing an action. This
way they can make sure that they’ve
selected what they’ve actually wanted.




Roland UDVARLAKI - Unit 20 – Assignment 2 – P3, M2, D1 – Page 3 of 19

, Roland UDVARLAKI




Prompting the user: A prompt message will
help users or ask them to do something.




Redirecting the user: Redirecting does
what it says. It’ll redirect the user to
another webpage or section.




Roland UDVARLAKI - Unit 20 – Assignment 2 – P3, M2, D1 – Page 4 of 19

Geschreven voor

Study Level
Publisher
Subject
Course

Documentinformatie

Geüpload op
1 februari 2018
Aantal pagina's
19
Geschreven in
2016/2017
Type
ESSAY
Docent(en)
Onbekend
Cijfer
Onbekend

Onderwerpen

€11,30
Krijg toegang tot het volledige document:
Gekocht door 22 studenten

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Beoordelingen van geverifieerde kopers

7 van 10 beoordelingen worden weergegeven
6 jaar geleden

6 jaar geleden

Hi. Can I ask why you've given such low review please? You have not contacted me or asked any questions prior to purchasing the document.

6 jaar geleden

6 jaar geleden

6 jaar geleden

6 jaar geleden

Hi. Can I ask why you've given such low review please? You have not contacted me or asked any questions prior to purchasing.

6 jaar geleden

6 jaar geleden

6 jaar geleden

Hi. Can I ask why you've given such low review please? You have not contacted me or asked any questions prior to purchasing.

7 jaar geleden

3,3

10 beoordelingen

5
2
4
4
3
1
2
1
1
2
Betrouwbare reviews op Stuvia

Alle beoordelingen zijn geschreven door echte Stuvia-gebruikers na geverifieerde aankopen.

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
RolandUdv Pearson
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
436
Lid sinds
9 jaar
Aantal volgers
313
Documenten
75
Laatst verkocht
2 jaar geleden

Hello there. I am average student and have always been aiming to get the best possible grades i can get. I have 99% of the times attempted and many times achieved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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'t hesitate to contact me for more information. I am more than happy to help.

Lees meer Lees minder
3,8

115 beoordelingen

5
47
4
31
3
19
2
3
1
15

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen