Click here to Skip to main content
Licence 
First Posted 21 Mar 2003
Views 91,057
Bookmarked 41 times

Slide Show - New, Improved

By | 21 Mar 2003 | Article
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

Member

'Anil' Radhakrishna is a seasoned developer who enjoys working with Microsoft tools & technologies. He blogs quite regularly about his his little discoveries and on Web development tips, tricks and trivia. You can find some of his unusual code samples & snippets at his Code Gallery.
 
Twitter - mvark

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 1 Pinmembersatyam_dreams21:14 13 May '10  
Generalcategorywise slideshow of images Pinmembervijeet dhupia1:29 16 Aug '07  
GeneralNice Idea - doesn't implement in ASP.NET 2.0 & VS PinmemberCody_216:27 11 Apr '07  
GeneralRe: Nice Idea - doesn't implement in ASP.NET 2.0 & VS Pinmember'Anil' Radhakrishna20:01 11 Apr '07  
GeneralPhoto Slide Show in ASP.NET PinmemberDHARMA.R19:19 6 Jun '04  
GeneralRe: Photo Slide Show in ASP.NET PinmemberDotnut1:00 8 Jun '04  
GeneralRe: Photo Slide Show in ASP.NET PinmemberDHARMA.R3:07 8 Jun '04  
Generalaccessing a function from an external .js file Pinmembergin_blossoms7:25 18 Jan '04  

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.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 22 Mar 2003
Article Copyright 2003 by 'Anil' Radhakrishna
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid