473,382 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to control the order in which forms are displayed

Hello! I am trying to structure the order of a series of forms that
make up one record. Basically, I would like to detect the day of the
week, and based on the day send the end user to a particular form,
followed by another particular form, etc.,. The logic would be...

if(Monday)
form1 (submit)-> form2 (submit)-> form3 (submit)-> form4 (submit)->
Thanks page
else if(Tuesday || Thursday)
form2 (submit)-> form4 (submit)-> Thanks page
else
form1 (submit)-> form3 (submit)-> Thanks page

Is javascript the best way to accomplish this? How? Any help is
greatly appreciated. Thanks!
Jul 20 '05 #1
1 1222
"Supreme" <su*****@scs.howard.edu> wrote in message
news:5a*************************@posting.google.co m...
Hello! I am trying to structure the order of a series of forms
that make up one record. Basically, I would like to detect the
day of the week, and based on the day send the end user to a
particular form, followed by another particular form, etc.,.
The logic would be...

if(Monday)
form1 (submit)-> form2 (submit)-> form3 (submit)->
form4 (submit)-> Thanks page
else if(Tuesday || Thursday)
form2 (submit)-> form4 (submit)-> Thanks page
else
form1 (submit)-> form3 (submit)-> Thanks page

Is javascript the best way to accomplish this? How? Any
help is greatly appreciated. Thanks!


Client side javascript, no, server side javascript (most commonly
server-side JScript in ASP), yes.

To attempt this client-side would introduce a completely avoidable
dependence on an optional technology and the results would be needlessly
unreliable.

A server side script would be quite capable of writing the URL into the
action attribute on whichever form it was outputting based on whatever
criteria you chose. But exactly how would depend on your choice of
server-side language/approach and would be off topic here. Unless the
implementation was server-side javascript/JScript in which case you
would probably want to use the date information available to create a -
Date - object, where:-

var dt - new Date();

- would return the current date and time (on the server) as a Date
object, and:-

var weekDay = dt.getDay();

- or -

var weekDay = (new Date()).getDay();

- would assign the current day of the week to the - weekDay - variable
as a number in the range 0 to 6 where zero was Sunday. And then use that
number as the basis for the decision.

Richard.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dee | last post by:
I have a form which contains basics of a customer's order from table . I placed a tab control on this form which is still empty. I'm trying to design a project management database and would like...
3
by: Charles | last post by:
I am trying to add the ability for a user to change the order in which the elements are listed in a dropdown list box. Before I added the ListID field the dropdown list box order was controlled...
12
by: MLH | last post by:
I have created two forms: frmBrowseNegsMainform and frmBrowseNegsSubform. I put a subform control on the first of these. The SourceObject property for the subform control is, of course,...
14
by: simonmarkjones | last post by:
Hi, I'm having a bit of trouble editing an old database that was created quite a while ago by someone else. There is a form that lets the user select a member of staff and show details about the...
0
by: Sam Barham | last post by:
I have a ListView control, for which I have overwritten the WndProc method to gain access to the WM_PAINT message and generate my own OnPaint and OnPaintBackground messages, in order to colour the...
7
by: tom | last post by:
Hi, I want a listbox below a hidden calendar control. The problem is that the listbox will shadow the calendar when the calendar is visible. How can I bring the calendar from back to front? ...
6
by: dana lees | last post by:
Hello, I am developing a c# asp.net application. I have 2 forms. In the first webform ('header') i have a label. I want to reference that label from a different form ('user'), in order to...
6
by: MLH | last post by:
I don't always get what I want when I invoke the following Me!MySubFormControl.Refresh from code running in the main form. Am I doing something wrong here? Someone suggested that I open the...
11
by: John J. Hughes II | last post by:
I have a DataGridView displaying data from a DataSet. To the right of that I have a custom user control which displays one of the data set fields. The custom user control is bound to the data set...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.