Beruflich Dokumente
Kultur Dokumente
Why Dreamweaver?
WYSIWYG: What you see is what you get Fast development Ability to tweak code utilizing the code
view. Therefore, you give up nothing. W3C Compliant In addition to HTML, it can help you write code for server side technologies such as JSP and ASP.NET
Dreamweaver Views
Design View
WYSIWYG Like a word processing tool or other IDE such as MS Visual Studio
Code View
Shows the actual HTML code that will be created
Dreamweaver Tools
Property Inspector
Tag Selector
When you click on a given element, the property inspector shows its attributes and allows you to modify them Enables the designer to view the tags used for a particular block of text, and to edit a tag and its contents Shows a hierarchy of tags starting with the top-left tag
Dreamweaver Tools
DTD validation allows you to validate code
File Check Page validate markup
Tag chooser
Enables you to choose from all tags available to HTML Arranged in categories Includes entries for server-side languages
Dreamweaver tools
Document window
Allows you to view your document in various resolutions Allows you to see estimated download times
Help function
Dont be afraid to use it when you get stuck!
Folder Structure
Planning is important! Especially when you
are building a large site! Standards
Images folder js folder css folder Object or functional groupings
Identify
Protocol Domain Name Folder File
Domain Names
The top level domains include .com
(commercial), .net, .org, .mil, .gov, .edu, country codes (.us, .uk, .ca), .bix, .info, .museum, .name, .xxx A domain name server (DNS) translates the domain name into an IP address.
Design
Storyboards, folder structure, development technology and patterns, naming conventions
Using Dreamweaver
Go for it
Build Headers, Images, <br />, <p> Demonstrate Split Screen views (refresh required) Text insert Bar Formatting, linebreaks, and special characters Blockquote and cite attribute Ordered, unordered, definition lists HTML Insert <hr> and using css on <hr>
Intro to JavaScript
Javascript
Javascript is the most popular scripting language
on the web It allows you to improve design, validate forms, write cookies, detect browsers, create dynamic content, and more Javascript is NOT Java, though the syntax is simliar Like HTML, Javascript is a client-side language (though there are server-side implementations) Unlike HTML, it is a real programming language
What is Javascript?
It was designed to add interactivity to
HTML pages It is a scripting language (lightweight) It is an interpreted language (it is executed without preliminary compilation) Everyone can use it without purchasing a license
Javascript is event-driven
In order for a script or function to be
executed, something has to happen to trigger it Examples
<body onload=alert(Hello World!); /> <input type=button onclick=alert(Hello World!); /> <select onchange=alert(Hello World!); >
document.form1.firstName.focus(); This code will find a field called firstName on the form called form1 and put the cursor there.
XML documents document.getElementById(firstName) will return a reference to a given element that has the id attribute set to firstName
Javascript Syntax
To declare variables, use the var keyword
var firstName = Russell;
Inline Javascript
Use the event attributes of a given element
(onclick, onmouseover, onfocus, onchanged, etc) You can write the code right there, or simply call a function within the inline code Most pages will always have inline scripts because these are the events that drive the execution of the code
Embedded Javascript
<head> <script type="text/javascript"> //invoked on page load document.write("Hello World!"); //invoked when called function sayHi() { alert(hello again!); } /* this is another comment */ </script> </head> You can also put scripts in the <body> element!
External Javascript
Must go in the <head>
<script type="text/javascript src=myscript.js />
= sensitive (including variable names!) Variables declared in a function are only accessible in that function. Variables declared outside are available to all functions.
Meaning Assignment
==
!= &&
||
! +
Javascript If statement
if (x==y) { doSomething(); } elseif (x==v) { doSomethingElse(); } else { quit(); }
Popup Boxes
Alert: Includes OK button
alert(Hello World);
Functions
Without inputs
function hiThere() {
With inputs
function hiThere(firstName) {