Click here to Skip to main content
Click here to Skip to main content

Slide Show - New, Improved

, 21 Mar 2003
Rate this:
Please Sign up or sign in to vote.
Mimics PowerPoint functionality & can be used for short text messages

Sample Image - newss.jpg

Introduction

Nothing beats Powerpoint when it comes to presentations, right? The new Slide Show utility (check the older Slide Show[^]) attempts to mimic the same functionality for short text messages, minus all the fireworks, using JavaScript.

So what's new?

In the earlier version, I had used Frames ( now Div tag is used ) and you had to click on the buttons to move back and forth. Now the slides can be made to run automatically. The Show restarts once we come to the end of the Slide list. Moreover you can choose from a dynamic list of external JavaScript files, each of which may contain content on different topics.

Source code

The zipped source code file consists of -

  1. settings.aspx
  2. show.aspx
  3. sample .js files

How it works

You will need the .NET Framework to run the app.

The Setting.aspx dynamically picks up all the JS files in a specified folder and populates them into the listBox. On choosing a particular option from the listbox, i.e. the name of a JS file, that JS file is loaded on the fly, into the Show.aspx page and the first slide which is derived from a string array in the JS file shows up.

Here is the code to hookup the external JS file from Settings.aspx to Show.aspx

<script> 
var quip = new Array();
document.write('<script LANGUAGE="JavaScript" 
SRC="js/<%=Request.Params("extfile")%>"><\/SCRIPT>');
</script>

In the Show.aspx page , the messages can be scrolled both forward and backward using the buttons or it could be set to self-run mode.

The text for each slide can be a small message and this will be stored into each element of the string array of each JS file. The array size can be of variable length and additional messages can be added anytime to the external JavaScript file.

All the JS files have the same array called quip defined and the index of the array is a global variable which is controlled by the functions in Show.aspx.

You can change the time interval between 2 slides by setting the value in window.setTimeOut. In the example, it has been set to 1 sec.

myTimer=window.setTimeout("automato()",1000)

Even image tags can be inserted into the array in place of a string and an image slide show can also be performed.

This code can be modifed to make it run in Classic ASP too. BTW, isn't Classic ASP an oxymoron?

References

Links

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

'Anil' Radhakrishna
Web Developer
India India
'Anil' Radhakrishna is a seasoned developer who enjoys working with Microsoft tools & technologies. He blogs quite regularly about his little discoveries and technical experiments on his blog called Tech Tips, Tricks & Trivia. You can find some of his unusual code samples & snippets at his Code Gallery. He loves building mash-ups using public Web APIs.
Follow on   Twitter

Comments and Discussions

 
GeneralMy vote of 1 Pinmembersatyam_dreams13-May-10 21:14 
Generalcategorywise slideshow of images Pinmembervijeet dhupia16-Aug-07 1:29 
GeneralNice Idea - doesn't implement in ASP.NET 2.0 & VS PinmemberCody_2111-Apr-07 6:27 
GeneralRe: Nice Idea - doesn't implement in ASP.NET 2.0 & VS Pinmember'Anil' Radhakrishna11-Apr-07 20:01 
GeneralPhoto Slide Show in ASP.NET PinmemberDHARMA.R6-Jun-04 19:19 
GeneralRe: Photo Slide Show in ASP.NET PinmemberDotnut8-Jun-04 1:00 
GeneralRe: Photo Slide Show in ASP.NET PinmemberDHARMA.R8-Jun-04 3:07 
Generalaccessing a function from an external .js file Pinmembergin_blossoms18-Jan-04 7:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 22 Mar 2003
Article Copyright 2003 by 'Anil' Radhakrishna
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid