#1 (permalink)  
Old 08-15-2006, 08:57 PM
Registered User
 
Join Date: Jul 2005
Posts: 10
go to next page function

Hello,

I have been trying to find a function that will

1. load the starting page in the iframe when link is clicked
2. load the next page in order when clicked again, and so on through all the pages
3. When the last page is loaded in the iframe and the next is clicked again the loading page will be the first page which starts the process again.

Kind of like having a 'slideshow' for html pages being loading into an iframe instead of images being shown in a viewer.

Does anyone know of such a script? I have tried to search but none of the searches I've done has resulted in anything remotely like this.

Any help will be appreciated.

Ruth
Reply With Quote

  #2 (permalink)  
Old 08-16-2006, 08:02 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
Well, here are some ideas:

1)
Create an array in JavaScript with names of the pages you want to have in your slideshow.

2)
Use a variable to keep track of the page you currently display. You could either use the page name (= same as in the array), or the index of the current page in the array.

3)
Write a script to iterate through your array.


For starters, some code to set an iframe's "src":
Code:
<iframe id="your_iframe" src="start.html"></iframe>
<script language="JavaScript" type="text/javascript">
<!--
function changePage()
{
  var e = document.getElementById('your_iframe');
  e.src = 'http://www.htmlcenter.com/';
}
//-->
</script>
<span style="text-decoration:underline;" onclick="javascript:changePage();">Change iframe to HTMLCenter</span>
Just a quick draft to get you started - no guarantees.

Hope that helps you!
Till
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"session validation checking" in html page ...HELP dragon Programming and Scripting 4 08-15-2006 02:06 PM
Jump to a sub Function from a link???? NevadaSam Programming and Scripting 2 05-08-2006 11:37 AM
showLayer function, layer position problem ruthann Programming and Scripting 3 03-19-2006 11:13 AM
How do I highlight a split function text? gilgalbiblewhee Programming and Scripting 7 01-31-2006 05:12 PM
jscript: error sending data from page to function weirdlNet Programming and Scripting 5 09-16-2005 06:34 AM


All times are GMT -5. The time now is 05:34 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter