this is more what I am trying to do
<input type="Text" id="counterField">
<script>
function doCounter(obj,num,pre)
{
pre = num;
num = num+1;
obj.value = obj + num + " : " + pre;
setTimeout("doCounter(" + obj + "," + num + "," + pre + ");",1000);
}
doCounter(document.all["counterField"],1,0);
</script>
when the object is trying to be passed back in the setTimeout function, it
becomes undefined
Steve
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Steve Onnis
Sent: Tuesday, August 19, 2003 4:34 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: OT : JavaScript
That doesnt work cause when the function gets called in the setTimeout, the
function is being called outside the original function and the arguments are
no longer available to the function, so it errors
Steve
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Steve Baty
Sent: Tuesday, August 19, 2003 4:26 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: OT : JavaScript
Steve,
I think you need to do something like:
function increaseSize(obj,params){
var oldObj = obj;
var oldParams = params;
//alert(obj.width);
obj.width = obj.width+10;
obj.height = obj.height+10;
if (params.endWidth >= obj.width)
{setTimeout("increaseSize(oldObj,oldParams)",1000);}
}
}
-----------------------------------
Steve Baty
senior analyst
Red Square Productions
p: 612 8506 4030
f: 612 8596 4001
e: steve @redsquare.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
Onnis
Sent: Tuesday, August 19, 2003 4:03 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: OT : JavaScript
anyone?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Steve Onnis
Sent: Tuesday, August 19, 2003 3:11 AM
To: CFAussie Mailing List
Subject: [cfaussie] OT : JavaScript
Hey guys
anyone able to help me with this?
function increaseSize(obj,params)
{
//alert(obj.width);
obj.width = obj.width+10;
obj.height = obj.height+10;
if (params.endWidth >= obj.width)
{setTimeout("increaseSize(" + obj + "," + params
+")",1000);}
}
basically i need to recall the function but keep passing the original
arguments back into the function.
cant seem to get it to trigger
Any ideas?
Regards
Steve
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/