Can't you just make the variables global?
var oldObj = obj;
var oldParams = params;
function increaseSize(obj,params){
//alert(obj.width);
obj.width = obj.width+10;
obj.height = obj.height+10;
if (params.endWidth >= obj.width)
{setTimeout("increaseSize(oldObj,oldParams)",1000);}
}
}
Taco
> -----Original Message-----
> From: Steve Baty [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, 19 August 2003 4:51 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] RE: OT : JavaScript
>
> Steve,
>
> What error do you get? "Object undefined"?
>
> Steve
>
> -----------------------------------
> 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: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/
-----------------------------------------------------------------------------------
The contents of this message are the views of the Author and do not necessarily
reflect the views of SUNCORP METWAY LTD ABN 66 010 831 722.
The content of this e-mail, including attachments is a confidential communication
between the Suncorp Metway Group and the intended addressee. Any unauthorised use of
the contents is expressly prohibited. If you have received this e-mail in error please
contact the sender immediately and then delete the message and any attachment(s).
http://www.suncorp.com.au
---
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/