Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a question list that is gene

Status
Not open for further replies.

janakrajani

Programmer
Dec 5, 2001
9
US
I have a question list that is generated dynamically using SQL Server 2000.

Each question has options which are dynamic, each question may not have the same number of options. Some may have 3 options, some may have 4.

Now at runtime, I want the client side script using VBScript. This script should check whether each question has a option selected or not. The form is submitted only if each question has a option selected.

How to do this in VBScript ?

Help appreciated.

Thanks.
 
You can do a simple client-side script that has a global [Checked-counter] starting with zero.

When your HTML is generated, make sure none of the questions are checked (I presume it is radio button).

For each question, when the option is clicked, increase the [Checked-counter] by one.

On the [Submit] button, cancel the event if the [Checked-Counter] variable is less than the number of questions.

Hope this helps :)


regards,
- Joseph
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Watches ~ Jerseys ~ Pen ~ Handbags ~ Clothes
-- How E-Commerce Transforms The World --
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top