473,772 Members | 3,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting value from radiobutton

I would like to make a script wich makes a select visible or not visible
depending on what radio button is selected.

If the radiobutton with the value "nieuw" is selected the pulldown is not
visible and when i select the radiobutton with the value "verwijdere n" the
pulldown should become visible.

The code i have makes the pull down visible but does not make it invisible
after i select another radiobutton.

This what i have so far:
<script language="JavaS cript">
<!--
function Menue()
{
if (document.all.k euze.value == "nieuw")
{
document.all.na am_keuze.style. visibility="hid den"
}
else
{
document.all.na am_keuze.style. visibility="vis ible"
}
};

//-->
</script>
</head>

<body>
<h1>Specialiste n / zorgverleners</h1>

<p align="left">
<input id="keuze" type="radio" name="keuze" value="nieuw"
onClick="Menue( )">
Nieuw
<input id="keuze" type="radio" name="keuze" value="bewerken "
onClick="Menue( )">
Bewerken
<input id="keuze" type="radio" name="keuze" value="verwijde ren"
onClick="Menue( )">
Verwijderen<img src="images/spacer.gif" width="100" height="5">
<select id="naam_keuze " size="1" name="keuze" style="visibili ty:visible">
<option>roy</option>
<option>jan</option>
<option>hans</option>
<option>piet</option>
</select>
</p>

thanks

roy
Jul 23 '05 #1
1 3843

"R.G. Vervoort" <ro**********@r oyvervoort.nl> a écrit dans le message de
news:40******** *************@n ews.xs4all.nl.. .
I would like to make a script wich makes a select visible or not visible
depending on what radio button is selected.

If the radiobutton with the value "nieuw" is selected the pulldown is not
visible and when i select the radiobutton with the value "verwijdere n" the
pulldown should become visible.

The code i have makes the pull down visible but does not make it invisible
after i select another radiobutton.

This what i have so far:
<script language="JavaS cript">
<!--
function Menue()
{
if (document.all.k euze.value == "nieuw")
Try this:
function Menue(selection )
{
if (selection == "nieuw")
{
document.all.na am_keuze.style. visibility="hid den"
}
else
{
document.all.na am_keuze.style. visibility="vis ible"
}
};

//-->
</script>
</head>

<body>
<h1>Specialiste n / zorgverleners</h1>
Change also onClick="Menue( )" to onClick="Menue( this.value)"

<p align="left">
<input id="keuze" type="radio" name="keuze" value="nieuw"
onClick="Menue( )">
Nieuw
<input id="keuze" type="radio" name="keuze" value="bewerken "
onClick="Menue( )">
Bewerken
<input id="keuze" type="radio" name="keuze" value="verwijde ren"
onClick="Menue( )">
Verwijderen<img src="images/spacer.gif" width="100" height="5">
<select id="naam_keuze " size="1" name="keuze" style="visibili ty:visible"> <option>roy</option>
<option>jan</option>
<option>hans</option>
<option>piet</option>
</select>
</p>

thanks

roy

Jul 23 '05 #2

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

Similar topics

8
2852
by: VK | last post by:
Hi! What I'm missing in following code? Cannot get the values of radiobuttons. Starting only one class (GetVariant), it works. When I put two classes together, it doesn't. Regards, VK from Tkinter import * class GetVariant: def __init__(self): self.root = Tk()
2
8484
by: bbxrider | last post by:
i have 2 radio buttons 1 for yes and 1 for no, it is mandatory for one to be checked, and am purposely leaving both blank on the page when i tested for .value, when neither was checked, an alert message comes back with literally 'undetermined', and i get the message 2x, once for each button alert("empty prevVolunteer is " + e.value); i.e, the text in the message box is "empty prevVolunteer undetermined" i haven't found anything...
2
1874
by: JeffFinnan | last post by:
<form name=form1> Load in Viewer Window: <input name="radiobutton" type="radio" value="1" checked onClick="1"> 1&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="2" onClick="2"> 2&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="3" onClick="3"> 3&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="4" onClick="4"> 4
1
3435
by: MickG | last post by:
I am trying to change the value of the variable "hard" according to which radio button is pressed and I am having no joy. Could anyone help me with this, the problematic section is marked with ***********************, I've included all the code incase that isn't where the problem is. Any help would be hugely appreciated. Mick
4
1391
by: darrel | last post by:
I have a contact form that a person submits to the server. In ASP, you'd make a page, post the form to another page, which would grab the values and do somethign with them. in ASP.NET, it appears that you grab the values directly from the form objects on the postback. Here's our problem:
2
5430
by: Rob | last post by:
Hi all, I've got multiple sets of radio button that are dynamically created in code and populated by a database query. The query returns about 20 recordsets with 3 radio buttons per recordset and I want to be able to retrieve the selected value from each of the sets of radio buttons.The names of each group of radio buttons is set by the database and I don't know how to retrieve the values because I don't know the names of these radio...
2
6610
by: Rich | last post by:
Hello, Is it possible to assign a value to a groupbox by selecting a radiobutton contained in the groupbox? Say you assign a value of 1 to radbtn1, 2 for radbtn2, 3 for radbtn3 all contained in grpBox. You click radbtn1. Console.writeline(grpBox.Value.ToString)
0
1304
by: Nathan Sokalski | last post by:
In the RadioButton and CheckBox controls, there is no Value attribute. The html <inputtag has a value attribute, which is used by both type="radio" and type="checkbox". The RadioButtonList and CheckBoxList controls have SelectedValue properties (I realize that the RadioButtonList uses the <selectand <optiontags instead of the <inputtag, but needing a value server-side exists either way). I am attempting to write a control with...
12
24815
by: ive1122 | last post by:
Hi guys, I am looking into create a dynamic survey as posted in Get User Input From Dynamic Controls but with some different environment Below is what i am trying to do: First when the user click the button, it will populate a dynamic table with radio button for the survey questionnaire However, i was unable to get its value (for score calculation) after clicking the submit button Beside i am using an ajax extension (updatePanel) for the...
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.