Toggling between 2 forms

This is a discussion on "Toggling between 2 forms" within the JavaScript Forum section. This forum, and the thread "Toggling between 2 forms are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 1st, 2006, 19:20
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Toggling between 2 forms

I'd like to be able to toggle from one page to another. Can anyone guide me on how to get that done? Thanks
Reply With Quote

  #2 (permalink)  
Old Jun 1st, 2006, 19:45
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Toggling between 2 forms

Quote:
Originally Posted by jayaime
I'd like to be able to toggle from one page to another. Can anyone guide me on how to get that done? Thanks
Isn't that what hyperlinks let you do???

I suspect you are looking for something a little more than that so you need to be a bit more specific about what you are trying to achieve.
Reply With Quote
  #3 (permalink)  
Old Jun 1st, 2006, 22:30
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Toggling between 2 forms

Well let me state exactly what I'm doing.
The form we are creating is a report form that displays company budget from dept to dept. Now within that report, each Manager needs to provide justification for budget that has been exceeded. The Managers have to provide an analysis of the "current date" and the "Fiscal Year". So I need to have 4 text boxes each to explain "current date" and "fiscal year". So we are deciding to place the "current date analysis on one form and place the "fiscal year" on another form, but would like to toggle between the 2 forms.

Do I create a button and link the page or can I toggle between the 8 text boxes for current and fiscal?
Reply With Quote
  #4 (permalink)  
Old Jun 2nd, 2006, 09:14
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Toggling between 2 forms

Still not sure how you intend things to operate. With tabbed capable browsers, you could have each form opened in a seperate tab and switch back and forth that way.

Remember also that information entered on a form is a transient thing. If the situation exists where you want to be able to toggle back and forth between the forms, in a single window (tab), with the information on those forms being in an 'incomplete' state, then the data entered needs to be stored when the form is left and reinstated when it is returned to.

You will need a mechanism to determine the difference between incomplete and a completed form.
Reply With Quote
  #5 (permalink)  
Old Jun 15th, 2006, 21:37
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Toggling between 2 forms

I don't think I explained this toggling issue correctly:

Actually it is not 2 forms. It's 1 form but wish to display 2 different information.(if that makes sense)

As I explained in an earlier post:

The form we are creating is a report form that displays company budget from dept to dept. Now within that report, each Manager needs to provide justification for budget that has been exceeded. The Managers have to provide an analysis of the "current date" and the "Fiscal Year". So I need to have 4 text boxes each to explain "current date" and "fiscal year". So we are deciding to place the "current date analysis on one form and place the "fiscal year" on another form, but would like to toggle between the 2 forms.

So what we did was added the redisplay function:
<script LANGUAGE="javaScript1.2">
functionRedisplay(ITD)
{
varchanged=parseInt(document.VARS.varsChanged.value);
if(changed!=0){
varmsg="The narratives have changed. Do you want to save your current changes?";
if(confirm(msg)){
document.VARS.action="draft.asp";
document.VARS.submit();
}
}else{
if(ITD=="False"){
document.VARS.itd.value="True";
}else{
document.VARS.itd.value="False";

and added a button that allows toggling to the textbox w/ "current month" infor and "To-date" info.
Reply With Quote
  #6 (permalink)  
Old Jun 15th, 2006, 22:21
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Toggling between 2 forms

Now with this same form, we have another issue:
HERE’s an example of my issue:
In the form we have where after filling out explanation on why budget has exceeded:
the “user” has to write out his explanation and once he does this and saves the form
his name is appended under the heading:

Preparer: (considered original preparer) Date:
user 6/15/2006

Now his manager must then review this and if he edits the form, his name is
appended under the heading:

Editor: Date:
manager 6/16/2006


The manager also can document this report before the user. So what we would like is that the original preparer’s name and date do not change once someone else edits and saves the form. Currently if the user first preparers the document and then the manager edits it, the manager’s name and date of edit is placed in Preparer’s textbox. We want it to only place it in the editor’s box at this point.

is there a mechanism to make this not happen?

Thanks in advance of any suggestions
Reply With Quote
  #7 (permalink)  
Old Jun 16th, 2006, 10:07
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Toggling between 2 forms

Each time the form is saved, why dont you also save in a database the name and date of the last person to edit that form.

When someone calls up that form, the names and dates of the previous editors/originator are also retrieved and displayed in rerad only format.
Reply With Quote
  #8 (permalink)  
Old Jun 21st, 2006, 06:07
Junior Member
Join Date: May 2006
Location: washington
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Toggling between 2 forms

The names are saved in the database and displays on the form. If I understand you correctly, you're saying when we do save the information allow it to be in "read only" mode and this will not cause the overwrite?
Reply With Quote
  #9 (permalink)  
Old Jun 21st, 2006, 09:05
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Toggling between 2 forms

Yes.

WHat you need are two tables. One that holds the form and one that holds the originators or editors. The id of the form record is the relational link to the originator or editors.

This way, you can edit the form as many times as you like. Each new edit is saved in the edits table and when the form is retrieved, you retrieve all the associated edit records and display them the information as read only.

You obviously provide allow input on each occasion for the details of the latest editor.
Reply With Quote
Reply

Tags
toggling, between, forms

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms crackafaza Web Page Design 3 Aug 13th, 2007 02:16
Forms acrikey Web Page Design 13 Aug 6th, 2007 21:31
JS and Forms roki13 JavaScript Forum 1 Jun 6th, 2007 15:28
forms mickc90 PHP Forum 3 Aug 1st, 2006 22:06
forms atomicant_2005 JavaScript Forum 15 Dec 9th, 2005 16:09


All times are GMT. The time now is 09:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43