CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Java Timer Not Work

Print topic Send  topic

Author Message
MichaelMcDonald

Posts: 601
Posted: 10/15/2012, 2:14 AM

I have the following script working on a form that form is not in edit mode...

<script language="JavaScript">
var start=new Date();
start=Date.parse(start)/1000;
var counts=100;
function countDown(){
var now=new Date();
now=Date.parse(now)/1000;
var x=parseInt(counts-(now-start),10);
if(document.recordWorkorder){document.recordWorkorder.recipient.value = x;}
if(x>0){
timerID=setTimeout("countDown()", 100)
}
}
window.setTimeout('countDown()',100);
</script>


Problem is that When I add the script to the onclick (client side) of a button on a form in editmode, this same script does not work. I have also tried placing the script in the forms onload client side to test and it doesnt work there either.
_________________
Central Coast, NSW, Australia.

Use the EXETA Online Business Valuation Tool to
value your business.

www.exeta.com.au
View profile  Send private message
DataDoIT
Posted: 10/15/2012, 6:21 AM

Debugging client-side javascript is very easy nowadays with the built-in
browser developer tools. Learn them and use them often. They'll tell
you exactly where your issues are.

Ex: In Chrome, load your page, then hit Ctrl-Shift-I. If there are
javascript errors it'll tell you exactly where and why.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.