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.
|
|
|
|
|
![]() |
||
Toggling between 2 forms
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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
|
|
|
|
|||
|
Re: Toggling between 2 forms
Quote:
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. |
|
|||
|
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? |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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?
|
|
|||
|
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. |
![]() |
| Tags |
| toggling, between, forms |
| Thread Tools | |
|
|
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 |