...

View Full Version : setTimeout()



nainil@eliteral
08-17-2005, 06:00 PM
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.

nikkiH
08-17-2005, 07:48 PM
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/author/persistence/overview.asp

nainil@eliteral
08-17-2005, 09:21 PM
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.

nikkiH
08-18-2005, 03:03 PM
Where are you storing the flag info? Database, cookie, session...?

nainil@eliteral
08-18-2005, 04:06 PM
The flag is stored in XML DataIsland field.
eg: <flag>true</flag>

Nainil C.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum