Results 1 to 6 of 6

Thread: setTimeout & Arrays??

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2004
    Location
    Texas
    Posts
    32

    setTimeout & Arrays??

    Can someone help me work this out?
    *****************************************************
    window.setTimeout "startAdd " & i & "," & iCount & "," & iNum & "," & iPfx, 2000
    *****************************************************
    iNum and iPfx are both arrays.
    I get a type mismatch error whenever I call startAdd like this.

    If I call it normally(startAdd i,iCount,iNum,iPfx) everything works fine.

  2. #2

    Thread Starter
    Member
    Join Date
    Jun 2004
    Location
    Texas
    Posts
    32
    Is there anyone out there, who may possibly know why this is not working?

  3. #3
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by japshire
    Is there anyone out there, who may possibly know why this is not working?
    You would probably get a better response, if you posted it in HTML/XML forum. I will have a look at it when i get a chance, just tied up with few things.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  4. #4
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: setTimeout & Arrays??

    Originally posted by japshire
    Can someone help me work this out?
    *****************************************************
    window.setTimeout "startAdd " & i & "," & iCount & "," & iNum & "," & iPfx, 2000
    *****************************************************
    iNum and iPfx are both arrays.
    I get a type mismatch error whenever I call startAdd like this.

    If I call it normally(startAdd i,iCount,iNum,iPfx) everything works fine.
    Try using
    Code:
    window.setTimeout eval("startAdd " & i & "," & iCount & "," & iNum & "," & iPfx, 2000);
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2004
    Location
    Texas
    Posts
    32
    First off thanks for the help Danial.

    When I tried your amended code I get this error on page load.

    ****************************************************
    Expected end of statement


    Any thoughts??

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by japshire
    First off thanks for the help Danial.

    When I tried your amended code I get this error on page load.

    ****************************************************
    Expected end of statement


    Any thoughts??
    Oh No! I thought you were using JavaScript! Seems like you are using VBScript. I have never used VBScript in client side and advise everyone against doing so. I am not sure if VBS has SetTime out function.

    Also Eval function is for JavaScript, so thats why you are getting error.

    My advice would be try avoid using VBScript in client side.

    Sorry couldnt be any help...
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width