CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Java Timer Not Work

Print topic Send  topic

Author Message
MichaelMcDonald

Posts: 640
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.

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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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