Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: setTimeout()

  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up setTimeout()

    Hi,

    I am yet a newbiee in JavaScript. I have this logic in mind. I do not know how to put it into action in JavaScript. If someone could help me..

    1. First time the form is opened, Declare flag=true; Store this value of flag in the form during form load.
    >>>> Then I press the submit button to save the form and it's values.

    2. The second time the form is opened, it should check....... if flag=true, do this
    <BODY style="margin:10px" onload="setTimeout('chkSubmit()',10000);" class="tabviewer">
    and set flag=false.

    3. Now when I open the same form again, Now since the flag=false it should just do

    <BODY style="margin:10px" class="tabviewer">


    Please help.

    Thank you.

    Nainil Chheda.

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    You might be able to just persist the form.
    Not sure if that is IE only, but it's easier than all this.
    http://msdn.microsoft.com/workshop/a...e/overview.asp

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I could use an input type=" hidden " .....

    To save the flag information .. however, I am finding it difficult to get the exact coding for my logic.

    Nainil C.

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Where are you storing the flag info? Database, cookie, session...?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #5
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The flag is stored in XML DataIsland field.
    eg: <flag>true</flag>

    Nainil C.


  •  

    Posting Permissions

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