Download presentation
Presentation is loading. Please wait.
1
1 November Building an Interactive Web Page
2
Presentations Casey: Current event A J: Education Cherrelle: Advertising
3
Caveat There are lots of differences between browsers What I’m going to describe works for HTML 4 on Mozilla No guarantees on other browsers That’s why some pages don’t work on Mozilla but only Internet Explorer
4
Recognizing events in forms Primary one: onclick Others: onfocus, onmouseover, … http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.3 Attribute within an tag The command that is in that field is executed when the button is clicked on
5
If the action uses a variable Needs to be none everywhere Define it in Define here
6
Or action can be function Just like a mathematical function Executes its description Place it in the head section, surrounded by … Need to indicate that you’re using javascript
7
Learning by Example onclick="buy_latte(this.form)“ Function is buy_latte Pass it a value to work with in () Will always be “this.form” Passes all of the values that you have identified in your form
8
Inside the function Value passed is called the parameter We’ll always call the value form function buy_latte(form) { form.result.value = "latte"; form.price.value = 1; } Always set a variable by referring to it as form.input-value-name.value
9
Let’s look at an example http://www.cs.unc.edu/~pozefsky/Beancounter2.html
10
Wednesday Gary Bishop, Computer Science Department Assistive Technology Technology available to help people with disabilities But VERY expensive Goal: to build low-cost assistive technologies
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.