Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-17-2005, 05:00 PM   PM User | #1
nainil@eliteral
New to the CF scene

 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nainil@eliteral is an unknown quantity at this point
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.
nainil@eliteral is offline   Reply With Quote
Old 08-17-2005, 06:48 PM   PM User | #2
nikkiH
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
nikkiH is on a distinguished road
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/
nikkiH is offline   Reply With Quote
Old 08-17-2005, 08:21 PM   PM User | #3
nainil@eliteral
New to the CF scene

 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nainil@eliteral is an unknown quantity at this point
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.
nainil@eliteral is offline   Reply With Quote
Old 08-18-2005, 02:03 PM   PM User | #4
nikkiH
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
nikkiH is on a distinguished road
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/
nikkiH is offline   Reply With Quote
Old 08-18-2005, 03:06 PM   PM User | #5
nainil@eliteral
New to the CF scene

 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nainil@eliteral is an unknown quantity at this point
The flag is stored in XML DataIsland field.
eg: <flag>true</flag>

Nainil C.
nainil@eliteral is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:53 AM.


Advertisement
Log in to turn off these ads.