Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Multipage DB form query with radio buttons

Posted on 2003-03-31
11
Medium Priority
?
167 Views
Last Modified: 2013-12-24
Using FP 2002 to develop a database driven questionnaire.
I can get the whole thing to work by using drop down boxes and passing hidden variables to the next form and so on, but I want the first few pages to be radio button driven.

For example :

Page1 - Is your defect...a) internal b)...external

pick internal, then shows questions based on internal

Page 2 - Is your defect... a) electrical  b)water  c)gas

thanks
0
Comment
Question by:CraigBFG
11 Comments
 
LVL 14

Accepted Solution

by:
hhammash earned 100 total points
ID: 8239576
Hi,

<HTML>
<HEAD>

<SCRIPT LANGUAGE="JavaScript">

function DispText (val) {
frm=document.forms[0]

     if(val=="option 1")
document.MyForm.Dispq.value="This is the Internal question";

     else {
     document.MyForm.Dispq.value="This is the external question";
     }

}

</SCRIPT>

</HEAD>
<BODY TEXT="000000" BGCOLOR="FFFFFF">

<FORM name="MyForm">

<INPUT TYPE=radio NAME="f1" VALUE="option 1" onClick="DispText
(this.value)">Internal
<INPUT TYPE=radio NAME="f1" VALUE="option 2" onClick="DispText
(this.value)">External<p><input type="text" name="Dispq" size="85"></p>
<P>
&nbsp;

</FORM>
</BODY>
</HTML>

hhammash
0
 
LVL 14

Expert Comment

by:hhammash
ID: 8239607
Hi,

In FrontPage, double click the textbox, click style, borders then put the textbox border to be with the same color of your background.

This is a textbox with white borders which make the textbox invisible,  so when you click the the option it will display the question as if there is no textbox.

<input type="text" name="Dispq" size="85" style="border: 1px solid #FFFFFF"></p>


hhammash
0
 
LVL 19

Expert Comment

by:webwoman
ID: 8240334
There's no difference between radio buttons and other fields. They pass values the same way. It's just the way they look that's different.

If you were using dropdowns, there's no reason you can't use radio buttons instead. Just use the same name as you did for the dropdowns for the group of radio buttons, and give each of them a value, the same as you did for the dropdowns.

The user will only be able to select ONE button in the group. Selecting a different button in the group will toggle the other one off. However, when they click the submit button, there's no difference between the radio button and any other form field that has a value.
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
LVL 14

Expert Comment

by:hhammash
ID: 8243678
Hi CraigBFG,

I forgot to tell you that Option 1 in my code above is the value of the Radio button,  so you have to change it with your value.

You have a group name for the Radio Button and you have the value.  Put the value that you like then use it in the code.

hhammash
0
 

Author Comment

by:CraigBFG
ID: 8243903
That's ok, but the values have to come from a databasenot be hard coded into the page.

I've tried using radio button instead of a drop down box but it doesn't seem to work.

Any more ideas?
Craig
0
 
LVL 14

Expert Comment

by:hhammash
ID: 8244073
Hi,

What will come from the database,  the questions?

Would you please put the table structure?

hhammash
0
 
LVL 14

Expert Comment

by:hhammash
ID: 8244090
Hi,

I will work according to your table structure.  You can send the table to me to hmaf@yahoo.com with test records in it.

hhammash
0
 

Expert Comment

by:RotaredoM
ID: 8341241
Experts,

A points split was requested by CraigBFG at http://www.experts-exchange.com/Community_Support/Q_20586701.html

If no objections are made within 72 Hrs, I'l split as requested.

Thank you,

RotaredoM
CS Mod @ EE
0
 
LVL 14

Expert Comment

by:hhammash
ID: 8341402
Hi RotaredoM,

I have no objection.

hhammash
0
 

Expert Comment

by:RotaredoM
ID: 8364076
As requested, points reduced from 50 to 25.

CraigBFG,
Please finalize this question as instructed at  http://www.experts-exchange.com/Community_Support/Q_20586701.html


Thank you,

RotaredoM
CS Mod @ EE
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 8367434
Force accepted

** Mindphaser - Community Support Moderator **

webwoman, there is a separate question with points for your help in http://www.experts-exchange.com/Web/WebDevSoftware/FrontPage/Q_20591380.html
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question