Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 17th, 2004, 08:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default setTimeout second to Minute

How can change the following timer (timeout) second to Minutes ?
I use following script

<HEAD>
<script language="JavaScript">
function goweb()
{ location.href="http://dcilweb/confirmed.asp" }
</script>
</HEAD>
<BODY>
<script language=JavaScript>
{ setTimeout("goweb()",8000) }
</script>
</body>


settimeout is 8000 second, How can change setTimeout into Minutes ?

regards.

Mateen





Reply With Quote
  #2 (permalink)  
Old November 17th, 2004, 09:18 AM
joefawcett's Avatar
Wrox Author
Points: 9,731, Level: 42
Points: 9,731, Level: 42 Points: 9,731, Level: 42 Points: 9,731, Level: 42
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,068
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You can't change the units used, you just have to multiply by 60. Or write your own setTimeout function which wraps the built in one.



--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old November 20th, 2004, 10:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for response.

java script timeout is very fast (it is diferent the actual time)

ie.

our movie time is 12:26 (12 minutes and 26 seconds)
I change it into seconds ie 746 seconds.
but it is so fast that within 20 or 30 seconds movie finish
why ?

how can put actually time in seconds in java script as
posted above ?

in java script 8000 means 8 seconds.

how can write 12:26 (12 minutes 26 seconds) in seconds in
java script ?

regards.

Mateen


Reply With Quote
  #4 (permalink)  
Old November 21st, 2004, 01:33 PM
joefawcett's Avatar
Wrox Author
Points: 9,731, Level: 42
Points: 9,731, Level: 42 Points: 9,731, Level: 42 Points: 9,731, Level: 42
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,068
Thanks: 1
Thanked 38 Times in 37 Posts
Default

(12 * 60 + 26) * 1000

It's not designed to be used as a precise timing instrument. There are too many things that can affect it, processor speed, tick resolution and thread handling. If you are only targetting IE you'd be better off using the timing stuff provided by HTML+TIME.
What are you using the setTimeout to do?



--

Joe (Microsoft MVP - XML)
Reply With Quote
  #5 (permalink)  
Old November 24th, 2004, 07:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your response.
it is ok.
I run movie (road safety using activemoviecontral) on company intranet.
I use settimeout when Movie finish then page move to next
page, there it will ask to confirm that user watch the movie or
not. but I am one more problem in java script.

How can move the variable by java script ?
I want that when movie finish then movie name move to next page
how ?


I use this script

<html>
 <head>
<title>Welcome to Parsons</title>
<script language="JavaScript">
function goweb()
{ location.href="http://dcilweb/DCILDepts/Administration/Parsons_Video/confirmed.asp" }
</script>
</head>
<body>
<script language=JavaScript>
{ setTimeout("goweb()",8000) }
</script>
</body>
</html>

I want that when page move to confirmed.asp page it also move the movie name to confirmed.asp page how ?

regards.

Mateen



Reply With Quote
  #6 (permalink)  
Old November 24th, 2004, 09:11 AM
joefawcett's Avatar
Wrox Author
Points: 9,731, Level: 42
Points: 9,731, Level: 42 Points: 9,731, Level: 42 Points: 9,731, Level: 42
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,068
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Code:
function goweb()
{
  var sUrl = "http://dcilweb/DCILDepts/Administration/Parsons_Video/confirmed.asp"; 
  location.href= sUrl + "?movie=<Movie Name Here>"; 
}
Your asp page can now check Request("Movie") for the name.

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #7 (permalink)  
Old November 28th, 2004, 02:12 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your help.

Mateen


Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relod dataGridview thousands of time in minute Theone84 C# 2005 2 April 21st, 2008 05:23 AM
job schedule every minute for a stored procedure dfgilto SQL Server 2005 1 February 7th, 2008 07:30 PM
setTimeOut with a zero parameter? calgarychinese ASP.NET 1.0 and 1.1 Basics 3 April 5th, 2007 09:44 PM
Using setTimeout PortGuy Javascript 7 March 25th, 2004 02:06 PM



All times are GMT -4. The time now is 04:04 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.