473,387 Members | 1,535 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,387 software developers and data experts.

Help with Minute javascript issue please.

13
Hi, heres it is, I'm trying to rotate these content items by minute. Can anyone see what I am doing wrong? Thanks, Tami

var content = new Array();

content[1] = "page.html";
content[2] = "anotherpage.html";

var mydate = new Date();
var myminutes = mydate.getMinutes();
{
var minutes = '1' + minutes;
}

var iframeprops = 'width=150 height=100 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"';

function minute_iframe() {
document.write('<iframe id="dynstuff" src="',content[myminutes],'" '+iframeprops+'></iframe>');
}
Sep 13 '06 #1
6 981
Tami
13
I messed up I am pretty sure these two:

var mydate = new Date();
var myminutes = mydate.getMinutes();

Should be replaced with something like this, but still not working.
var myminutes = today.getMinutes();
Sep 13 '06 #2
Tami
13
I'm being told in a javascript error message that "today" is undefined.
Sep 13 '06 #3
Tami
13
Ahhhh I got it! Had to change several things around.
Sep 13 '06 #4
Tami
13
Hi I have a working copy of some script that works.

var mydate = new Date();
var mytoday = mydate.getDate();

How do I change this to get minutes intead? Maybe seconds would work too if
I can adjust the seconds to equal minutes.
This is what I have but its not working. Hope someone can help, thanks! Tami

var today = new Date();
var minutes = today.getMinutes();
{
var minutes = '1' + minutes;
}
Sep 14 '06 #5
Tami
13
This is what I have now and it almost works.

var today = new Date();
var minutes = today.getMinutes();
setInterval("minute_iframe()", 60000);

It changes the object on its own in one minute but then it stops, it won't keep
changing it automatically.
Sep 14 '06 #6
Tami
13
Nevermind, got it.
Sep 14 '06 #7

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

Similar topics

2
by: Ben | last post by:
The page below isn't picking up details or location. What have I missed? Thanks in advance, Ben ____________________________________________ <?PHP
8
by: DKM | last post by:
Here are the source code files to a Java applet that utilizes LiveConnect to communicate with Javascript, and the HTML file. The thing works both in IE 6.0 and FireFox 1.4. but with some...
4
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
1
by: sebasC | last post by:
the code below is used on a site to show time in multiple time zones on the website what i need is to convert the php code below to asp so that it will work. because the clock shows on the site but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.