473,388 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

iFRAME auto-cycle code

1
Trying to figure out how to auto-cycle an iFRAME.

Here is the link in question:

http://pushingtheenvelope.ca/new/web.html

Would like to cycle the iFRAME choices.

Got this from experts-exchange.com however:

1. Dreamweaver is not color-coding it correctly after line one so I am thinking there is something wrong with it?

2. I have a rollover javascript in place - am I to place this in a new <script></script> entry or within the other one?

<script type="text/Javascript">
var myFrames = new Array("frame1.html", frame2.html", "etc");
var frameNo = 0; //Frame to start on
var seconds = 5; //Number of seconds between frames
var myCycle; //Do not change
function cycleFrames() {
frameNo++;
if ( frameNo == myFrames.length ) frameNo = 0;
window.open(myFrames[frameNo], "frame_id");
myCycle = setTimeout("cycleFrames()", 1000*seconds);
}
function stopCycle() {
cleartimeout(myCycle);
}
</script>

Thanks. Obviously I know crap when it comes to coding.
Jun 17 '07 #1
1 2450
gits
5,390 Expert Mod 4TB
hi ...

the code should work ... but you have to call your cycleFrames-function ;) search the 'onload'-handler of your document body, it looks like:

[HTML]
<body onload="MM_preloadImages('images/menu/home-on.gif','images/menu/services-on.gif','images/menu/about-on.gif','images/menu/testimonials-on.gif','images/menu/contact-on.gif','images/menu/webdesign-on.gif','images/menu/printdesign-on.gif','images/menu/photography-on.gif')">
[/HTML]

at the end, add the call to your cycleFrames-function (note the semicolons):

[HTML]
<body onload="MM_preloadImages('images/menu/home-on.gif','images/menu/services-on.gif','images/menu/about-on.gif','images/menu/testimonials-on.gif','images/menu/contact-on.gif','images/menu/webdesign-on.gif','images/menu/printdesign-on.gif','images/menu/photography-on.gif'); cycleFrames();">
[/HTML]

try it ... it should work ...

kind regards ....
Jun 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Conax | last post by:
Hi, It's me again asking about IFRAME. With UncleWobby, Steven Burn and Roland Hall's help, I was able to create a proper IFRAME section on my page. Now I come to the next problem. I'd...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
9
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
3
by: coolsti | last post by:
I need some help here. I am making an application which allows a user to look at a series of picture files one at a time, and enter the outcome of various visual tests to a database. The...
3
by: webguru | last post by:
I am trying to be able to pass a parameter in my URL to a subpage that will load the file specified in the paramater into an IFRAME. I have hardly used Javascript, and am trying to figure out how...
7
by: Patrick.O.Ige | last post by:
Can i use Frameset in ASP.NET?What are other options I have a question :- I have an asp.net page and i'm using TreeView control as links The links are on the left side of the page inside a iframe!...
3
by: Asterbing | last post by:
Since the "on fly addition..." thread has taken another direction, I'm opening a new one to be more explicit and recenter the subject. Well, the subject is to detect when a document is well...
0
by: Jason Rodman | last post by:
I have been having a very wierd problem with IFrames in a web form. If I specify any type of url in the src attribute of a Iframe, the whole Iframe is not rendered by asp.net. for example, here is...
2
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I have a aspx page that loads PDF files into a frame (I call an ShowFile.aspx file that uses Response.BinaryWrite). I want that the user can see div with the message loading and...
2
by: mynameisyohann | last post by:
hi guys, I am trying to make some iframes fit into a div with variable width. The iframe must have a margin, and using a padding in the parent div element is not an option. Unfortunately, the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.