We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9
OUTLINE
• Creating slide show
• Creating a Pull down menu > Creating a pull down menu > Dynamically changing a menu > Validating Menu selection CREATING A SLIDE SHOW • A slideshow is similar in concept to a banner advertisement in that a slideshow rotates multiple images on the web page • However, unlike a banner advertisement, a slideshow gives the visitor the ability to change the image that is displayed • The visitor can click the Forward button to see next image and the Back button to see the previous image • Creating a slideshow for your web page is similar to creating banner • Just beneath the <img> tag you have to add two buttons Forward and Back • Both buttons will call a java script function in response to onclick event • The java script function will take a parameter, which determines whether next or previous image is going to be displayed CREATING PULL DOWN MENU • You can simplify the navigation of your website by using menus to organize web pages • Developers can also use Menus to collect information from users by prompting visitors to choose items from the list • You can group web pages into pull-down menu • The menu can reflect a common theme among web pages, and each menu option can identify a web page • You can use java script to load the selected page • An HTML <select> element is used to create a pulldown menu • The <option> tag inside the <select> element define the available options • Then as per the menu(option) selection java script will load the required web page CREATING PULL DOWN MENU DYNAMICALLY CHANGING A MENU • Options listed on a Menu can be changed dynamically based on the choices the visitor makes on the page • For example, you can create two pull-down menus called Department and Employees. The visitor selects the Department, and based on this selection, the list of corresponding employees appears in Employees menu • Menu options can be added dynamically by using such type of code VALIDATING MENU SELECTION • Menus can be used to collect information form the visitor • Here visitor is prompted to choose items from the list and the chosen item is used for further processing • A common problem in this is that visitor doesn’t select an item from menu before submitting the form • This will be problematic if the item is required for processing the form • You can solve this problem by using a java script function to determine whether the required menu option is selected after the visitor clicks the submit button and before the form is submitted to the server • This java script function written for validation may be called on ‘onsubmit’ event of <form>