473,805 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get the value of dynamically created radio button.

5 New Member
I have dynamically created radio buttons.how to get the value of these buttons using post.
$i=1;
<input type="radio" name="qtn-$i" value="yes">
$i++;
how to get this value using post method.
Jan 3 '11 #1
3 3140
HaLo2FrEeEk
404 Contributor
More context on exactly why the radio is dynamically created might help. If you're populating from a database then check the database on the page that handles the POST data. If you want to create a variable number of radio buttons with the same base name, just add [] or [$i] to the end of the name.

Ultimately I think you're going to need to post more code so that we can see exactly what you're trying to accomplish.
Jan 4 '11 #2
vidhya raman
5 New Member
I have used [$i] and solved the problem.Thank U.
Jan 4 '11 #3
HaLo2FrEeEk
404 Contributor
You are welcome. Please be sure to mark the answer as the best answer for future readers.
Jan 4 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
24443
by: Randell D. | last post by:
Folks, I have a form (called FORM1) - In my INPUT submit tag, I have an onClick event that I have successfully tested/used to display the value of a TEXT box using the following function (called via an onClick event) <script type="text/javascript"> function performPrePostChecks() { // myName being an iput text box
1
3326
by: Karthick Kumar | last post by:
Hi, I have the following code which displays all the images from a specific folder with a Radio button in it: Dim objFile i = 1 For Each objFile In objFolder.Files If (i = 1) Then Response.Write("<TR>")
2
1550
by: darrel | last post by:
I'm using some standard HTML radio buttons (to allow finer javascript interaction) on a web page and would like to catch the selected item on postback. Since they are all ID's uniquely, is there a way to grab only the selected item's value? Or do I need to write an if/then statement to figure out which one is selected? Sample: <input runat="server" id="radio1" name="category" /> <input runat="server" id="radio2" name="category" />
3
5184
by: Mike P | last post by:
I am working with some code where a number of contacts are taken from a table and then added to a page with a radio button to the right of each one where the name of each radio button has the contact key appended. RadioButton rbtn = new RadioButton(); rbtn.ID = "btn" + ds.Tables.Rows.ToString(); rbtn.GroupName = "Group1"; rbtn.CheckedChanged += new
1
5468
by: Mufasa | last post by:
I have a couple of radio buttons that make various things appear/disappear on the screen through JavaScript. All works great. Problem is I'll click a radio button, something will appear, I reload the page for other reasons and the item disappears. The reason it disappears is I have to set the state initially to invisible so it doesn't show up initially. The radio buttons are html radio buttons not aspx radio buttons so I can have the...
3
2866
by: romano2717 | last post by:
I have a test.php file that contains a set of radio buttons generated inside a loop. then I append the $i variable to the radio button name to have a unique set of radio buttons. the scenario should be this: when i click the submit button, test2.php should display the values of the radio buttons selected in the test.php file FILE: test.php <html> <head> <title>RADIO</title> </head> <body>
7
4876
by: moksha | last post by:
Hi, I am new to javascript and i am facing a problem in coding. plz help me out. I am using javascript for dynamically creating a table row which contains text boxes and radio buttons and check box. I am adding two radio buttons once for a row.Now my problem is the radio buttons in all the rows that added dynamically are behaving as same group i.e when i am selecting a radio button in second row,radio button in first row...
1
2430
by: akshay01 | last post by:
Hi all, I am using the following code to create the radio button group in which i have a while loop which will create the radio buttons with same name and different values. while(rs.next()){ <INPUT TYPE="radio" NAME="RadioValues" VALUE="A"+no_of_elements> } here "no_of_elements" is an interger value.. Does anyone knows how to get the value of the checked radio button in next jsp after submitting the form??
2
2044
by: donpro | last post by:
Hi, Does anyone know how to use DOM to find the value of a selected radio both (or if none were selected)? My web page displays a set of radio buttons - the number is dynamic so could be one or 100; I do this within a loop. At the moment, I'm giving each one the same name and ID - not sure if giving the same ID is correct or not. By default, no radio buttons
5
6710
by: satyabhaskar | last post by:
hi all, In my web page i have created radio buttons dynamically on to the page .....following is my code string Course, Semester, Section; int rowsCount; string con = ConfigurationManager.ConnectionStrings.ConnectionString; protected void Page_Load(object sender, EventArgs e) { try
0
9716
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
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
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...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7645
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
6875
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();...
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
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.