Skip to Content
0
Former Member
Jan 14, 2008 at 09:17 AM

How to select single radio button in particular group and to calculate valu

21 Views

Hi.. Experts..

I have 2 radiobutton groups and each radiobutton group consists 10 radio buttons..

in each group i want to select one radiobutton and based on the radiobutton selected the value

as to get calculated.

what happens is that if i select a radiobutton in onegroup and select in another group , radiobutton selected in previous group get's

deselected.

please help in this .. it's very urgent...

here is my code .. help if want to change the coding or is there any better way of coding then this..

<%@page language="abap"%>

<%@extension name="htmlb" prefix="htmlb"%>

<htmlb:content design="design2003">

<htmlb:page title = " ">

<htmlb:form>

<%@include file="tst1.htm" %>

<htmlb:tray id = "2"

width = "100%" >

<htmlb:gridLayout columnSize = "15"

rowSize = "3"

cellPadding = "5"

cellSpacing = "5"

width = "100%" >

<htmlb:radioButtonGroup id = "rbg1"

columnCount = "3"

selection = "<%= selection %>" >

<%-- qno --%>

<htmlb:gridLayoutCell columnIndex = "1"

rowIndex = "1"

width = "30" >

1

</htmlb:gridLayoutCell>

<%-- Dimensions --%>

<htmlb:gridLayoutCell columnIndex = "2"

rowIndex = "1"

width = "300" >

Understands the company's vision and long-term goals and the role he/she and team members have to play in accomplishing them.

</htmlb:gridLayoutCell>

<%-- Rating Scale - Don't know --%>

<htmlb:gridLayoutCell columnIndex = "3"

rowIndex = "1"

width = "80" >

Don't Know

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "3"

rowIndex = "2" >

N

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "3"

rowIndex = "3" >

<input type="radio" name="sex" value="n">

</htmlb:gridLayoutCell>

<%-- Rating Scale - Rarely --%>

<htmlb:gridLayoutCell columnIndex = "5"

rowIndex = "1" >

Rarely

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "4"

rowIndex = "2"

width = "20" >

1

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "4"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "5"

rowIndex = "2"

width = "20" >

2

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "5"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "6"

rowIndex = "2"

width = "20" >

3

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "6"

rowIndex = "3" >

<input type="radio" name="sex" value="hello">

</htmlb:gridLayoutCell>

<%-- Rating Scale - sometimes --%>

<htmlb:gridLayoutCell columnIndex = "7"

rowIndex = "1" >

Some

times

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "7"

rowIndex = "2"

width = "20" >

4

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "7"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "8"

rowIndex = "2"

width = "20" >

5

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "8"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "9"

rowIndex = "2"

width = "20" >

6

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "9"

rowIndex = "3" >

<input type="radio" name="sex" value="hello">

</htmlb:gridLayoutCell>

<%-- Rating Scale - most of the time --%>

<htmlb:gridLayoutCell columnIndex = "10"

rowIndex = "1" >

Most of the time

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "10"

rowIndex = "2"

width = "20" >

7

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "10"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "11"

rowIndex = "2"

width = "20" >

8

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "11"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<%-- Rating Scale - all the time --%>

<htmlb:gridLayoutCell columnIndex = "12"

rowIndex = "1" >

All the time

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "12"

rowIndex = "2"

width = "20" >

9

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "12"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "13"

rowIndex = "2"

width = "20" >

10

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "13"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

</htmlb:radioButtonGroup>

</htmlb:gridLayout>

<%-- qno2 --%>

<htmlb:gridLayout columnSize = "15"

rowSize = "3"

cellPadding = "5"

cellSpacing = "5"

width = "100%" >

<htmlb:radioButtonGroup id = "rbg2"

columnCount = "3"

selection = "<%= sel %>" >

<%-- qno --%>

<htmlb:gridLayoutCell columnIndex = "1"

rowIndex = "1"

width = "30" >

1

</htmlb:gridLayoutCell>

<%-- Dimensions --%>

<htmlb:gridLayoutCell columnIndex = "2"

rowIndex = "1"

width = "300" >

Understands the company's vision and long-term goals and the role he/she and team members have to play in accomplishing them.

</htmlb:gridLayoutCell>

<%-- Rating Scale - Don't know --%>

<htmlb:gridLayoutCell columnIndex = "3"

rowIndex = "1"

width = "80" >

Don't Know

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "3"

rowIndex = "2" >

N

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "3"

rowIndex = "3" >

<input type="radio" name="sex" value="n">

</htmlb:gridLayoutCell>

<%-- Rating Scale - Rarely --%>

<htmlb:gridLayoutCell columnIndex = "5"

rowIndex = "1" >

Rarely

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "4"

rowIndex = "2"

width = "20" >

1

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "4"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "5"

rowIndex = "2"

width = "20" >

2

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "5"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "6"

rowIndex = "2"

width = "20" >

3

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "6"

rowIndex = "3" >

<input type="radio" name="sex" value="hello">

</htmlb:gridLayoutCell>

<%-- Rating Scale - sometimes --%>

<htmlb:gridLayoutCell columnIndex = "7"

rowIndex = "1" >

Some

times

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "7"

rowIndex = "2"

width = "20" >

4

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "7"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "8"

rowIndex = "2"

width = "20" >

5

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "8"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "9"

rowIndex = "2"

width = "20" >

6

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "9"

rowIndex = "3" >

<input type="radio" name="sex" value="hello">

</htmlb:gridLayoutCell>

<%-- Rating Scale - most of the time --%>

<htmlb:gridLayoutCell columnIndex = "10"

rowIndex = "1" >

Most of the time

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "10"

rowIndex = "2"

width = "20" >

7

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "10"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "11"

rowIndex = "2"

width = "20" >

8

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "11"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<%-- Rating Scale - all the time --%>

<htmlb:gridLayoutCell columnIndex = "12"

rowIndex = "1" >

All the time

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "12"

rowIndex = "2"

width = "20" >

9

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "12"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "13"

rowIndex = "2"

width = "20" >

10

</htmlb:gridLayoutCell>

<htmlb:gridLayoutCell columnIndex = "13"

rowIndex = "3" >

<input type="radio" name="sex" value="male">

</htmlb:gridLayoutCell>

</htmlb:radioButtonGroup>

</htmlb:gridLayout>

</htmlb:tray>

</htmlb:form>

</htmlb:page>

</htmlb:content>