Need help with radio button

D

Darth Ferret

I have screen where if radio button q1 is clicked I must unclick q1a if it
is selected, and vice versa. I can't put them into a single group because of
an interface through MYSql.
I have an onClick event calling a javascript function if either is clicked,
and I know that I'm getting that far, but I just can't find the syntax to
turn off the other button.

An example would sure be appreciated.

Thanks in advance,
Joe
 
W

William Tasso

Darth said:
I have screen where if radio button q1 is clicked I must unclick q1a
if it is selected, and vice versa. I can't put them into a single
group because of an interface through MYSql.

yes you can
 
H

Hywel Jenkins

I have screen where if radio button q1 is clicked I must unclick q1a if it
is selected, and vice versa. I can't put them into a single group because of
an interface through MYSql.

Of coufrse you can. It makes far more sense to let a server-side
process handle the selection than relying on JavaScript that may or may
not work on the client.

MyRadio.checked=false;
 
B

Beauregard T. Shagnasty

Darth Ferret pounced upon this pigeonhole and pronounced:
I have screen where if radio button q1 is clicked I must unclick q1a if it
is selected, and vice versa. I can't put them into a single group because of
an interface through MYSql.
I have an onClick event calling a javascript function if either is clicked,
and I know that I'm getting that far, but I just can't find the syntax to
turn off the other button.

You want your HTML radio buttons to work like auto radio buttons, right?
An example would sure be appreciated.

<input type="radio" name="radio1" value="This"> This, or
<input type="radio" name="radio1" value="That"> That

"name" must be the same for the whole group. Your server-side script must
read which is ticked before implanting in the database.
 
D

Darth Ferret

Unfortunately this is not a standard web site form. We work through a web
hosting company that supplies a piece of front end software that does many
forms handling chores including handling our issues management and
automatically emailing whoever I put in a list. I can create and upload a
new type of customer form very easily - but I really DO have to give the
radio buttons different names. I cannot use a group.

Whether this is good or bad it's what I have to work with, and I'm pulling
my hair out coming up with a simple function to uncheck radio button q1a if
radio button q1 is clicked.

I'm trying variations of !myform.q1a.checked=false;

I'm getting an error in dream weaver. !myform is defined in this function,
and also in another function where I am able to check !myform.q1.value for
missing fields.

Thanks for the help,
Joe in Florida
 
H

Hywel Jenkins

Darth Ferret said:
Unfortunately this is not a standard web site form. We work through a web
hosting company that supplies a piece of front end software that does many
forms handling chores including handling our issues management and
automatically emailing whoever I put in a list. I can create and upload a
new type of customer form very easily - but I really DO have to give the
radio buttons different names. I cannot use a group.

Whether this is good or bad it's what I have to work with, and I'm pulling
my hair out coming up with a simple function to uncheck radio button q1a if
radio button q1 is clicked.

I'm trying variations of !myform.q1a.checked=false;

Is "!myform" the name or ID of your form? I haven't tested it, but I
expect that you can't start a variable or object name with "!" and
access it with JavaScript because the character has special
significance in JavaScript.
 
H

Hywel Jenkins

Darth Ferret said:
Unfortunately this is not a standard web site form. We work through a web
hosting company that supplies a piece of front end software that does many
forms handling chores including handling our issues management and
automatically emailing whoever I put in a list. I can create and upload a
new type of customer form very easily - but I really DO have to give the
radio buttons different names. I cannot use a group.

Whether this is good or bad it's what I have to work with, and I'm pulling
my hair out coming up with a simple function to uncheck radio button q1a if
radio button q1 is clicked.

I'm trying variations of !myform.q1a.checked=false;

Read this while you're at it:

http://allmyfaqs.com/cgi-bin/wiki.pl?How_to_post
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top