Print Page | Close Window

Controlling Complex Web Form

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3951
Printed Date: 30 March 2026 at 6:55am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Controlling Complex Web Form
Posted By: Gary
Subject: Controlling Complex Web Form
Date Posted: 30 June 2003 at 4:32am

I have a rather large progressive web form. That is to say that as the form progresses in status, more of the form becomes 'available'. I want to be able to control the form fields depending on the status as follows:

Status: <SELECT> list with <OPTION>'s such as Stage1, Stage2, Stage3 and Stage4 (always available)
If Stage1 is selected, then only the first part of the form is available - maybe form items 10-20. The rest of the form should be visible, but readonly)
x days later, the status is then changed (by user) to Stage2 at which point both the first (10-20 items) and second (21-32 items) are available. Again, the rest of the form visible, but readonly.
This then continues right through all the status levels.

I think that I could figure this out, but just wanted some input into how YOU would go about this in the easiest, most efficient way. Also, should I control the form with client-side Javascript or server-side asp ???

Any thoughts, ideas, recommodations would be much appreciated. Sample script or links would be even better.




Replies:
Posted By: ljamal
Date Posted: 30 June 2003 at 7:42am
Use ASP and use the status to determine which parts are the form are active and store the data server side in a database.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: Gary
Date Posted: 30 June 2003 at 7:51am

That is one possibility, but if the user changes the status, the page will need to be reloaded.
Before that happens, I will need to write any changes to the database (does the user want to commit changes???). 

Therefore, maybe Javascript would be better???

What I am after from this thread is a discussion on what you guys would do. Also, the pro's and con's of the various available options.



Posted By: ljamal
Date Posted: 30 June 2003 at 7:58am
The user could disable Javascript (and some do to avoid pop ups) and then your system fails completely. With a multiple step process, you shouldn't give the user any more control than necessary. They should step through the process and (maybe be able to step backwards) but after each step the data should be submitted back to the server. Rather than having status a a select box, I would include the status as button and disable the buttong if they are not applicable.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: Bluefrog
Date Posted: 30 June 2003 at 8:09am
I'd go with server-side, but you can do a hidden div with a message saying that the user needs to submit to commit the changes. Then change it with javascript, unhide the div, let the user commit it with a submit (or button that is javascripted), and then do everthing permanently on the back side  


Posted By: Gary
Date Posted: 30 June 2003 at 8:15am

I forgot to mention, this is for an intranet web application which is going to be used by no more than 10 people.

The fact that i0t is internal means that we do not have to worry about JS being disabled.

Does that change your view on issue ???

Thx



Posted By: Bunce
Date Posted: 30 June 2003 at 8:49am

My vote is for server side. Simply break the steps into separate pages and show what is applicable on that page. Store the current status in a database or file somewhere.

A rule of thumb I try to remember is to not cause the user to scroll down more than 1 page (for average resolution) for any pages on the site. There are exceptions of course, but this might help in your case.

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: MorningZ
Date Posted: 30 June 2003 at 9:00am

another vote for server-side, not only will it be a whole heck of a lot of coding in javascript (yick!), but it'll run slow on the browser checking that many fields

i don't use the reason "they might have javascript disabled".. if someone has that going on, half the sites on the net wouldn't work, lol



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: ljamal
Date Posted: 30 June 2003 at 9:08am
Turn off your javascript and surf your usual web site, you'll be surprise at the number that still function.

When I am designing a site, unless absolutely necessary, Javascript usuage is minimal and when used it is usually just bells and whistles.

I guarantee that for every site you name that doesn't work without Javascript, there I can name 5 that do.

As a programmer, I find it hard to beleive that any programmer, even in a fixed environment, would depend open something that the user can (and does) disable on a whim.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: MorningZ
Date Posted: 30 June 2003 at 9:16am

while i'm sure you'd be able to "name 5 that work to one that doesn't", it all really comes down  to a matter of programming style

Most of my code depends on certain things, sometimes Javascript is required for something to work, i can live with the minimal number of people who for some reason have "javascript turned off"....

maybe i'm living in a tunnel or something, but my main web site has 27,000+ signups, and i have no complaints of something not working or what not because a window wouldn't popup or a mousover wouldn't work or a field was disabled/enabled via javascript....



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: ljamal
Date Posted: 30 June 2003 at 9:39am
If I can name 5 to 1 then that's hardly half the web as you stated.

While it does come down to coding preference, when it comes down to needing something to work regardless of the environment, you are better off not using something that the user can disable.

When it comes to data verification on form submission, do you rely on Javascript or do you use server side scripting or both? Why?

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: Gary
Date Posted: 30 June 2003 at 9:44am

I guess that (for me anyway) it depends on the project. Sometimes client-side, sometimes server-side, but mostly both.

I am lucky enough to work in a 'controlled environment' and only have to worry about IE (ok, so that makes me lazy, stupid, etc !!!). If one of my apps relies upon JS and a user has disabled JS, then we just tell them to comply with the company standarad and enable it.



Posted By: ljamal
Date Posted: 30 June 2003 at 9:56am
What does an app do that would cause it to not function correctly if Javascript is disabled? Try as I may, I haven't been able to think of a scenario where Javascript is absolutely necessary.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: MorningZ
Date Posted: 30 June 2003 at 10:28am

my apologies, my apoligizes.. didnt realize someone would take "half" so literally..

as for data verification...  client-side for those who support it so that it'll save a trip to the server (and give "real time" validation), but ALWAYS server side to catch all situations

maybe seems like "much"?.. but as said above.. programming preferences.... which i believe was the "spirit of this thread"

 



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Gary
Date Posted: 30 June 2003 at 10:32am

Absolutely Morningz - I wasn't necessarily looking for THE answer, but just wanted to get some ideas and opinions.

The beauty (or sometimes pain in the arse) with this industry is that there is rarely one single right way of doing things. There is more than 1 way to skin a cat !!!



Posted By: MorningZ
Date Posted: 30 June 2003 at 11:12am

Originally posted by ljamal ljamal wrote:

What does an app do that would cause it to not function correctly if Javascript is disabled? Try as I may, I haven't been able to think of a scenario where Javascript is absolutely necessary.

what is "absolutely necessary" anyways?  any person who picked up and read "Learn ASP in 10 Minutes" can make a form, submit it to the database and let Database column definitions/rules control the data

but using something like Client Side script is all about improving the visitor's experience on the site.....  and (at work) making the application more user friendly for non-internet types (javascript to validate, help, show immediately on the browser), or on my personal stuff using javascript to make the site more "wow" than all my competition sites, i think spending the time, and maybe even requiring javascript be turned on, to code with client and server script going is a good thing.....

besides, i take it since you don't code against anything that someone can turn off, how do you handle someone having their IE security set to max??  this setting stops all cookies, which also stops session from working properly

i am just trying to chime in that there is no way in hell one is going to be able to code a page that satisfies every browser, every platform, every setting... you'd NEVER get any work done, lol

look! even this forum software: http://www.morningz.com/images/temp/javascript_off.jpg - http://www.morningz.com/images/temp/javascript_off.jpg

at some point, a programmer/developer has to draw the line on requirements.... you'll be way behind the curve if you don't

my 2 cents....



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: ljamal
Date Posted: 30 June 2003 at 12:08pm
I don't use sessions, don't see much point when a normal cookie can do it without the extra server load.

Every site that I ever designed in fully functional without the use of javascript. Cookies are used when necessary to store and retrieve state information and when used I keep them to a minimum.

I use a highly customized version of this forum and I shut off the IE enhanced posting because it was slow to load and my users did not find it useful.

For me Javascript is never a necessity and it only used for special features and enhancements. The question posed here was how should he control the form "with client-side Javascript or server-side asp" ? Clearly, everyone has stated that server side is the way to go.

When developing for companies that have a wide base of customers, it is not possible to "draw the line" with requirements, so you have to design with the LCD in mind and try not to be too intrusive or demanding of the site's visitors. I think it's safe to assume that most people have cookies and javascript enabled, but from every day practice, I know that they do not so I design to take that into consideration. If something like cookies or javascript are required, I inform the user before allowing them to use that feature which gives them the ability to decide (before usage) whether or not they wish to enable those features. Not doing so is the quickest way to insure phone calls from irate web visitors saying something doesn't work. I have worked in e-commerce web programming for almost 10 years and even today I recieve a regular strea, of calls because someone is trying to use an e-commerce site without cookies and can't get it to work properly.

Regarding Javascript validation, I don't bother (unless a lot of data is being passed) as I have to do it server side any way.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net