Tutorial 5 Windows and Frames Section B - Working with Frames and Other Objects Go to Other Objects.

Slides:



Advertisements
Similar presentations
Frames. What are frames? The ability to divide the browser window into sections that can function independently of one another. Navigation within the.
Advertisements

Creating Frames. Frames allow you to view more than one Web page at a time. You can split the browser window horizontally and vertically. You can also.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Frames.
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
XP 1 Designing a Web Site with Frames Using Frames to Display Multiple Web Pages Tutorial 5.
Javascript Document Object Model. How to use JavaScript  JavaScript can be embedded into your html pages in a couple of ways  in elements in both and.
XP Creating Web Pages with HTML, 3e Prepared by: C. Hueckstaedt, Tutorial 5 1 New Perspectives on Creating Web Pages with HTML Tutorial 5: Using Frames.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
The Power of Tables They aren't just for sitting stuff on anymore...
JavaScript, Third Edition
Create a Web Site with Frames
Web Technologies Lecture # 5 : HTML Frames. Objectives n Create/control appearance & placement of frames n Control the behavior of hyperlinks on pages.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: Frames © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design.
Chapter 6 Working with Frames.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: HTML Frames.
HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames.
XP Tutorial 5New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Designing a Web Site with Frames Using Frames to Display Multiple Web Pages Tutorial.
XHTML1 Topics Work with the Frameset Document Type Definition (DTD) Create frames Use the target and base attributes Create nested frames Format frames.
XP 1 Tutorial 5 Using Frames in a Web Site. XP 2 Tutorial Objectives  Describe the uses of frames in a Web site  Lay out frames within a browser window.
XP Using Frames in a Web Site Ali Alfayly. XP Tutorial Objectives Create frames for a Web site Control the appearance and placement of frames Control.
FRAMES. With frames, we can display more than one HTML document in the same browser window. Each HTML document is called the same browser window. Each.
CIS 451: HTML Frames Adapted from materials developed by Dr. Soe (updated January, 2009)
HTML: Tables & Frames Internet Technology1. HTML: Tables Table tags ► surround the entire table ► header row (text is boldfaced) ► surround each row ►
Frame Page A Frame Page does the following: –Defines the size of each frame. –Defines how the window will be broken up – rows or columns. –Specifies which.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
Chapter 12 FRAMES. HOW FRAMES WORK When you view a framed page in a browser, you are actually looking at several HTML documents at once. The key to making.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 7: Working with Frames Kelly L.
Introduction to JavaScript 41 Introduction to Programming the WWW I CMSC Winter 2004 Lecture 17.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
CSCE 102 – Chapter 6 (Web Design and Layout) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
1 HTML Frames
76 © 1998, 1999, 2000 David T. Gray, Howard Duncan, Jane Kernan Frames When displaying information in a browser, it is sometimes useful to divide the display.
1 Planning and Laying Out Frames Sketch the frame structure on paper before writing the HTML code two rows two columns.
For the World Wide Web Designing with Frames.  One of the most popular climbing schools in Colorado is Cliff Hangers. Located in Bolder, Cliff Hangers.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
Windows and frames and the anchor tag. Frames Independent, scrollable portions of a Web browser window, with each frame capable of containing its own.
Jozef Goetz, © 2011 Pearson Education Copyright (c) 2007Prentice-Hall. All rights reserved.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Chapter 5: Windows and Frames
Using Frames in a Website GMU November 12-13, 2004.
Navigator, Windows and Frames
XP Tutorial 6 New Perspectives on JavaScript, Comprehensive1 Working with Windows and Frames Enhancing a Web Site with Interactive Windows.
CO1552 – Web Application Development Linking Pages - The Basis of the Web.
HTML: Tables & Frames Internet Technology.
Tutorial 8 Designing a Web Site with Frames. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore the uses of frames.
The Web Wizard’s Guide To JavaScript Chapter 8 Working with Windows and Frames.
Windows and frames and the anchor tag. Frames Independent, scrollable portions of a Web browser window, with each frame capable of containing its own.
1 HTML Frames
© Marty Hall, Larry Brown Web core programming 1 HTML Frames.
JavaScript, Fourth Edition Chapter 4 Manipulating the Browser Object Model.
Topic 5 Windows and Frames. 2 Goals and Objectives Goals Goals Understand JavaScript window object, how popup windows work, find the browser that a client.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
CSCI N241: Fundamentals of Web Design Copyright ©2004  Department of Computer & Information Science Working with Frames.
1 HTML Frames
Microsoft FrontPage 2003 Illustrated Complete Creating a Frames Page.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Jozef Goetz, © 2011 Pearson Education Copyright (c) 2007Prentice-Hall. All rights reserved.
XHTML Introductory1 Frames Chapter 5. XHTML Introductory2 Objectives In this chapter, you will: Work with the Frameset Document Type Definition (DTD)
HTML Comprehensive Concepts and Techniques Second Edition Creating Frames on a Web Page.
Introduction to HTML.
Client-Side Internet and Web Programming
Tutorial 8 Designing a Web Site with Frames
Client-Side Internet and Web Programming
Tutorial 8 Designing a Web Site with Frames
HTML Frames
Presentation transcript:

Tutorial 5 Windows and Frames Section B - Working with Frames and Other Objects Go to Other Objects

Tutorial 5B Topics Section B - Working with Frames and Other Objects –How to create frames –How to use the TARGET attribute –How to create nested frames –How to format frames –About the NOFRAMES tag –About the Location object –About the History object –About the Navigator object –How to reference frames and windows

Working with Frames & Other Objects Creating Frames –Frame Independent, scrollable portions of a Web browser window, with each frame capable of containing its own URL JavaScript treats each frame in an HTML document as an independent window Each frame has its own Window object

Working with Frames & Other Objects Creating Frames – tag A frame container Can only contain and other tags –Others are ignored Do not use tags

Working with Frames & Other Objects Creating Frames –Frames can be created in rows, columns or both – attributes ROWS –Determines number of horizontal frames to create COLS –Determines number of vertical frames to create

Working with Frames & Other Objects Creating Frames –Frame dimensions Can be specified in: –Pixels »Absolute sizing –Percentages »Relative sizing »Asterisk (*) designates remainder of visible window

Working with Frames & Other Objects Creating Frames – tag Used to specify options for individual frames –e.g., URLs Placed within tags Can be assigned a name using the NAME attribute, which can be used as a target for a hyperlink

Working with Frames & Other Objects Creating Frames –Example: Frame Example

Working with Frames & Other Objects Using the TARGET attribute –Menu systems Popular use of frames One frame to contain the hypertext links Second frame to contain selected URLs –TARGET attribute Determines in which frame or Web browser window a URL opens tag –Used to specify a default target for all links in a document

Working with Frames & Other Objects Nesting Frames –Nested frame Frame contained within another frame URLs of frames are loaded in the order in which each tag is encountered

Working with Frames & Other Objects Nesting Frames –Example:

Working with Frames & Other Objects Nesting Frames –Example:

Working with Frames & Other Objects Frame Formatting – attributes Several attributes are available to change a frame’s appearance and behavior

Working with Frames & Other Objects Frame Formatting –Example:

Working with Frames & Other Objects The tag –Some older browsers are incompatible with frames tag displays an alternate message to users of those browsers –Example: You cannot view…

Working with Frames & Other Objects The Location Object –Allows you to change to a new web page from within JavaScript code –Contains several properties and methods for working with the URL of the document currently open in a Web browser window Go to First Slide

Working with Frames & Other Objects The Location Object –When you modify any property of the Location object, you generate a new URL –The web browser will then automatically attempt to open that new URL

The Location Object Example: location.href = “ Will cause the browser to open the ithaca home page

The Location Object The assign() method is same as the href property: location.assign(“ Will cause the ithaca home page to be loaded in the browser. The reload() method is same as the reload button –If no argument or argument is false then the page is reloaded only if it has changed –If argument is true then the page will always reload

The Location Object The replace() method is similar to the href property: location.replace(“ –Difference: replace actually overwrites one document with another –Also replaces the old URL entry in the web browser’s history list. –The href property opens a different document and adds it to the history list.

The Location Object Example: –Redirect.html

Working with Frames & Other Objects The History Object –Maintains a history list of all the documents that have been opened during the current Web browser session –Security features History object will not display the URLs on the list May traverse the history list using methods/properties In IE: only allows navigation if page is in same domain

Working with Frames & Other Objects The History Object Example: <input type="button" name="goto" value=" Go To " onClick="parent.main.location.href=document.controls.newURL.value;"> <input type="button" name="next" value=" Next URL " conClick="parent.main.history.forward();"> <input type="button" name="previous" value=" Previous URL " conClick="parent.main.history.back();">

Working with Frames & Other Objects The Navigator Object –Used to obtain information about the current web browser –Typically used to identify browser

Working with Frames & Other Objects The Navigator Object –Example: document.writeln(“Browser code name: “ + navigator.appCodeName); document.writeln(“Web browser name: “ + navigator. appName); document.writeln(“Web browser version: “ + navigator. appVersion); document.writeln(“Operating platform: “ + navigator. platform); document.writeln(“User agent: “ + navigator. userAgent);

Working with Frames & Other Objects The Navigator Object –Shortcut: with (navigator) { document.writeln(“Browser code name: “ + appCodeName); document.writeln(“Web browser name: “ + appName); document.writeln(“Web browser version: “ + appVersion); document.writeln(“Operating platform: “ + platform); document.writeln(“User agent: “ + userAgent); }

Working with Frames & Other Objects The Navigator Object –testing: If (navigator. appName == “Microsoft Internet Explorer”) { location.href = “ } Else location.href = “

Working with Frames & Other Objects The Navigator Object –Example: NavigatorObjects.html browserProperties.html

Working with Frames & Other Objects Referring to Frames and Windows –Frames object Includes a frames[ ] array that contains all the frames in a window –frames[0], frames[1], etc. –Parent property Used to refer to a frame within the same frameset –parent.frames[0], parent.frames[1] –Top property Used to refer to the topmost frame in a frameset

Working with Frames & Other Objects Referring to Frames and Windows –Example:

Working with Frames & Other Objects Referring to Frames and Windows –Example: frameReferences.html <INPUT TYPE="button" VALUE=" Get thirdFrame's URL " onClick="alert(parent.frames[2].location.href);"> <INPUT TYPE="button" VALUE=" Get the frame set document's URL " onClick="alert(top.location.href);">

Working with Frames & Other Objects Preventing frames: –Example: BreakoutCheck.html if (window != top) top.location.href=location.href –Changes the top window content to be the content of the current window