Copyright ©2005 Department of Computer & Information Science Advanced DHTML & DOM: Working with the Window Object.

Slides:



Advertisements
Similar presentations
Chapter 7 JavaScript: Introduction to Scripting. Outline Simple Programs Objects and Variables Obtaining User Input with prompt Dialogs – –Dynamic Welcome.
Advertisements

Tutorial 5 Windows and Frames Section A - Working with Windows.
Frames.
Multimedia and the World Wide Web HCI 201 Lecture Notes #5A.
The Web Warrior Guide to Web Design Technologies
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 4: Tables and Frames.
Frames 1 Lecture HTML: Frames and Miscellaneous Tags.
What we learned in last lesson How to add JavaScript to your HTML pages How to use dialog boxes and variables to store and utilize user input How to write.
Chapter 16 Dynamic HTML and Animation The Web Warrior Guide to Web Design Technologies.
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.
Create a Web Site with Frames
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.
Frameset. FrameSet With frames, we can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each.
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.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 9 Scott Marino.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Chapter 8 OBJECT-ORIENTED TECHNOLOGIES AND DSS DESIGN Decision Support Systems For Business Intelligence.
UFCEWT-20-3 Advanced Topics in Web Development Lecture 4 : JavaScript, Browsers & the HTML DOM-API.
History, Navigator, Screen and Form Objects Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
CSCI N341: Client-Side Web Programming Copyright ©2004  Department of Computer & Information Science Advanced DHTML.
Hyperlinks. Linking pages…Hyperlinks 2 Lecture 8  Hyperlink “A clickable HTML element that will direct the web browser to display a different Web page.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Reference for CIS127 and CIS 137.
Adding Image, audio and video files to web pages Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
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.
Advanced DHTML.
Copyright ©2005  Department of Computer & Information Science Advanced DHTML & DOM: Manipulating Styles with JavaScript.
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.
Working with HTML Frames The Good, The Bad & The Ugly.
Introduction to JavaScript 41 Introduction to Programming the WWW I CMSC Winter 2004 Lecture 17.
JAVASCRIPT QUIZ BOWL By: Joseph Lindo. Quiz Bowl Mechanics  Group w/ 5 maximum members  Question is presented at the board  Prepare piece of papers.
CSCE 102 – Chapter 6 (Web Design and Layout) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
Chapter 5: Windows and Frames
XP Tutorial 6 New Perspectives on JavaScript, Comprehensive1 Working with Windows and Frames Enhancing a Web Site with Interactive Windows.
Introduction to Javascript. What HTML Can & Can Not Do HTML Can HTML Can Display text Display text Display images Display images Display even animated.
Copyright ©2005  Department of Computer & Information Science Introducing Dialogue Windows.
Copyright ©2005  Department of Computer & Information Science Beginning DHTML: Working with Browser Objects.
Introduction to JavaScript Objects, Properties, Methods.
JavaScript DOM.
Windows and frames and the anchor tag. Frames Independent, scrollable portions of a Web browser window, with each frame capable of containing its own.
Project 10: Exploring the Window Object Essentials for Design JavaScript Level One Michael Brooks.
TOPIC II Dynamic HTML Prepared by: Nimcan Cabd Cali.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
HTML IMAGES. CONTENTS IMG Tag Alt Attribute Setting Width and Height Of An Image Summary Exercise.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
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.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
Project 5: Using Pop-Up Windows Essentials for Design JavaScript Level One Michael Brooks.
HTML Overview Part 8 – Java Applets 1. Applets 2  A Java applet is a small application embedded in your HTML document which runs in the browser window.
HTML Frames. Advantages to Using Frames n flexibility in design n information in different Web pages n remove redundancy. n site easier to manage. n update.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
HTML DOM Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
CISW CRC - Fishman 2014 / 2015 PRESENTATION 4b: CISW 400 (Online) – Client-side Scripting for the Internet Cosumnes River College Fishman – 2015.
INTRODUCTORY Tutorial 9 Creating Frames. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Decide when to use frames for a Web site Learn.
REEM ALMOTIRI Information Technology Department Majmaah University.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Working with the Window Object JavaScript considers the browser window an object, which it calls the window object.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Introduction to Web Site Development Department of Computer Science California State University, Los Angeles Lecture 9: JavaScript.
Applied Component I Unit II Introduction of java-script
Using E-Business Suite Attachments
Introduction to Web Site Development
Programming the Web using XHTML and JavaScript
Client-Side Internet and Web Programming
Document Object Model That’s DOM to you
Pertemuan 1b
Windows The Window Objects.
Presentation transcript:

Copyright ©2005 Department of Computer & Information Science Advanced DHTML & DOM: Working with the Window Object

Copyright ©2005 Department of Computer & Information Science Goals By the end of this lecture you should … Understand how to create new windows using the window.open() method.Understand how to create new windows using the window.open() method. Understand how to reference new windows and their values.Understand how to reference new windows and their values. continued …

Copyright ©2005 Department of Computer & Information Science Goals By the end of this lecture you should … Understand how to use the window.focus(), window.blur() and window.close() methods.Understand how to use the window.focus(), window.blur() and window.close() methods. Understand how to use the window.opener attribute object.Understand how to use the window.opener attribute object.

Copyright ©2005 Department of Computer & Information Science Introducing the Window Object Weve already seen a few of the window objects methods, including window.alert(), window.prompt(), etc.Weve already seen a few of the window objects methods, including window.alert(), window.prompt(), etc. However, JavaScript also gives us the ability to create new windows and open documents in them (or, if we want, write dynamic content to them).However, JavaScript also gives us the ability to create new windows and open documents in them (or, if we want, write dynamic content to them).

Copyright ©2005 Department of Computer & Information Science window.open() Method We can use the window.open() method to create a new window.We can use the window.open() method to create a new window. The method takes three arguments (all strings):The method takes three arguments (all strings): –URL to open in the new window –Target name for the new window –Optional window features variableName = window.open(URL,target,features)

Copyright ©2005 Department of Computer & Information Science New Window Features height (pixel value)height (pixel value) width (pixel value)width (pixel value) location (yes | no)location (yes | no) menubar (yes | no)menubar (yes | no) resizable (yes | no)resizable (yes | no) scrollbars (yes | no)scrollbars (yes | no) status (yes | no)status (yes | no) toolbar (yes | no)toolbar (yes | no) top (pixel value)top (pixel value) left (pixel value)left (pixel value)

Copyright ©2005 Department of Computer & Information Science Additional Methods window.focus() – Brings a window to the top of the stacking order & gives the keyboard focus in that window.window.focus() – Brings a window to the top of the stacking order & gives the keyboard focus in that window. window.blur() – Moves the keyboard focus away from a window.window.blur() – Moves the keyboard focus away from a window. window.close() – Closes a window and removes it from memory.window.close() – Closes a window and removes it from memory.

Copyright ©2005 Department of Computer & Information Science Open the file called theWindowObject_01.html

Copyright ©2005 Department of Computer & Information Science The opener Object The opener attribute object refers to a parent window that opens another window.The opener attribute object refers to a parent window that opens another window. We can control various attributes of the opener, like the location.href attribute, from the newly opened window.We can control various attributes of the opener, like the location.href attribute, from the newly opened window.

Copyright ©2005 Department of Computer & Information Science Open the file called theWindowObject_02.html

Copyright ©2005 Department of Computer & Information Science Open the file called theWindowObject_03.html

Copyright ©2005 Department of Computer & Information Science Summary To open a new window, we use the window.open() method.To open a new window, we use the window.open() method. We can specify a URL to open, a target name and window features as parameters for window.open().We can specify a URL to open, a target name and window features as parameters for window.open(). Some of the new window features include things like height, width, the presence of toolbars/scrollbars and positioning attributes, among others.Some of the new window features include things like height, width, the presence of toolbars/scrollbars and positioning attributes, among others. continued …

Copyright ©2005 Department of Computer & Information Science Summary window.focus() brings a window to the top of the stacking order.window.focus() brings a window to the top of the stacking order. window.close() removes a window from view.window.close() removes a window from view. The window.opener attribute object refers to the window that created another window.The window.opener attribute object refers to the window that created another window.