473,378 Members | 1,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

call finction to set a radio button

I can not see what the problem is with this script. I am just trying to
set a radio button by calling setCheckedValue('abbr_letter', 'V'). Sorry
I am new to javascript.
<html>
<head>
<script type="text/javascript">
function setCheckedValue(radioObj, newValue) {
if(!radioObj)
return;

var radioLength = radioObj.length;
if(radioLength == undefined) {
radioObj.checked = (radioObj.value == newValue.toString());
return;
}
for(var i = 0; i < radioLength; i++) {
radioObj[i].checked = false;
if(radioObj[i].value == newValue.toString()) {
radioObj[i].checked = true;
}
}
}
function disp_alert()
{
alert("I am an alert box!!")
}
</SCRIPT>
</head>
<body>
<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>
<table>
<tr>
<td><input type="radio" name="abbr_letter" value="A"
onclick="submit()"A </td>
<td><input type="radio" name="abbr_letter" value="B"
onclick="submit()"B </td>
<td><input type="radio" name="abbr_letter" value="C"
onclick="submit()"C </td>
<td><input type="radio" name="abbr_letter" value="D"
onclick="submit()"D </td>
<td><input type="radio" name="abbr_letter" value="E"
onclick="submit()"E </td>
<td><input type="radio" name="abbr_letter" value="F"
onclick="submit()"F </td>
<td><input type="radio" name="abbr_letter" value="G"
onclick="submit()"G </td>
<td><input type="radio" name="abbr_letter" value="H"
onclick="submit()"H </td>
<td><input type="radio" name="abbr_letter" value="I"
onclick="submit()"I </td>
<td><input type="radio" name="abbr_letter" value="J"
onclick="submit()"J </td>
<td><input type="radio" name="abbr_letter" value="K"
onclick="submit()"K </td>
<td><input type="radio" name="abbr_letter" value="L"
onclick="submit()"L </td>
<td><input type="radio" name="abbr_letter" value="M"
onclick="submit()"M </td>
</tr>
<tr>
<td><input type="radio" name="abbr_letter" value="N"
onclick="submit()"N </td>
<td><input type="radio" name="abbr_letter" value="O"
onclick="submit()"O </td>
<td><input type="radio" name="abbr_letter" value="P"
onclick="submit()"P </td>
<td><input type="radio" name="abbr_letter" value="Q"
onclick="submit()"Q </td>
<td><input type="radio" name="abbr_letter" value="R"
onclick="submit()"R </td>
<td><input type="radio" name="abbr_letter" value="S"
onclick="submit()"S </td>
<td><input type="radio" name="abbr_letter" value="T"
onclick="submit()"T </td>
<td><input type="radio" name="abbr_letter" value="U"
onclick="submit()"U </td>
<td><input type="radio" name="abbr_letter" value="V"
onclick="submit()"V </td>
<td><input type="radio" name="abbr_letter" value="W"
onclick="submit()"W </td>
<td><input type="radio" name="abbr_letter" value="X"
onclick="submit()"X </td>
<td><input type="radio" name="abbr_letter" value="Y"
onclick="submit()"Y </td>
<td><input type="radio" name="abbr_letter" value="Z"
onclick="submit()"Z </td>
</tr>
</TABLE>
<input type="button" onclick="setCheckedValue('abbr_letter', 'V')"
value="Set Radio Button">
<input type="button" onclick="disp_alert()" value="Display alert box">
</FORM>
</body>
--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ____________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nov 12 '06 #1
9 2208
IchBin wrote:
I can not see what the problem is with this script. I am just trying to
set a radio button by calling setCheckedValue('abbr_letter', 'V'). Sorry
I am new to javascript.
<html>
<head>
<script type="text/javascript">
function setCheckedValue(radioObj, newValue) {
if(!radioObj)
return;

var radioLength = radioObj.length;
if(radioLength == undefined) {
radioObj.checked = (radioObj.value == newValue.toString());
return;
}
for(var i = 0; i < radioLength; i++) {
radioObj[i].checked = false;
if(radioObj[i].value == newValue.toString()) {
radioObj[i].checked = true;
}
}
}
function disp_alert()
{
alert("I am an alert box!!")
}
</SCRIPT>
</head>
<body>
<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>
<table>
<tr>
<td><input type="radio" name="abbr_letter" value="A"
onclick="submit()"A </td>
<td><input type="radio" name="abbr_letter" value="B"
onclick="submit()"B </td>
<td><input type="radio" name="abbr_letter" value="C"
onclick="submit()"C </td>
<td><input type="radio" name="abbr_letter" value="D"
onclick="submit()"D </td>
<td><input type="radio" name="abbr_letter" value="E"
onclick="submit()"E </td>
<td><input type="radio" name="abbr_letter" value="F"
onclick="submit()"F </td>
<td><input type="radio" name="abbr_letter" value="G"
onclick="submit()"G </td>
<td><input type="radio" name="abbr_letter" value="H"
onclick="submit()"H </td>
<td><input type="radio" name="abbr_letter" value="I"
onclick="submit()"I </td>
<td><input type="radio" name="abbr_letter" value="J"
onclick="submit()"J </td>
<td><input type="radio" name="abbr_letter" value="K"
onclick="submit()"K </td>
<td><input type="radio" name="abbr_letter" value="L"
onclick="submit()"L </td>
<td><input type="radio" name="abbr_letter" value="M"
onclick="submit()"M </td>
</tr>
<tr>
<td><input type="radio" name="abbr_letter" value="N"
onclick="submit()"N </td>
<td><input type="radio" name="abbr_letter" value="O"
onclick="submit()"O </td>
<td><input type="radio" name="abbr_letter" value="P"
onclick="submit()"P </td>
<td><input type="radio" name="abbr_letter" value="Q"
onclick="submit()"Q </td>
<td><input type="radio" name="abbr_letter" value="R"
onclick="submit()"R </td>
<td><input type="radio" name="abbr_letter" value="S"
onclick="submit()"S </td>
<td><input type="radio" name="abbr_letter" value="T"
onclick="submit()"T </td>
<td><input type="radio" name="abbr_letter" value="U"
onclick="submit()"U </td>
<td><input type="radio" name="abbr_letter" value="V"
onclick="submit()"V </td>
<td><input type="radio" name="abbr_letter" value="W"
onclick="submit()"W </td>
<td><input type="radio" name="abbr_letter" value="X"
onclick="submit()"X </td>
<td><input type="radio" name="abbr_letter" value="Y"
onclick="submit()"Y </td>
<td><input type="radio" name="abbr_letter" value="Z"
onclick="submit()"Z </td>
</tr>
</TABLE>
<input type="button" onclick="setCheckedValue('abbr_letter', 'V')"
value="Set Radio Button">
<input type="button" onclick="disp_alert()" value="Display alert box">
</FORM>
</body>

I rewrote the function and it works. I thought that the old function
should work..

function setCheckedValue(newValue) {
var len = document.author_abbrv.abbr_letter.length
for(var i = 0; i < len; i++) {
document.author_abbrv.abbr_letter[i].checked = false;
if(document.author_abbrv.abbr_letter[i].value ==
newValue.toString()) {
document.author_abbrv.abbr_letter[i].checked = true;
}
}
}

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ____________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nov 12 '06 #2
IchBin wrote on 12 nov 2006 in comp.lang.javascript:
<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>
Dear YouAre,

Why do you make bold an element part the does not display anything?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 12 '06 #3
Lee
IchBin said:
>
IchBin wrote:
>I can not see what the problem is with this script. I am just trying to
set a radio button by calling setCheckedValue('abbr_letter', 'V'). Sorry
I am new to javascript.
<html>
<head>
<script type="text/javascript">
function setCheckedValue(radioObj, newValue) {
if(!radioObj)
return;

var radioLength = radioObj.length;
if(radioLength == undefined) {
radioObj.checked = (radioObj.value == newValue.toString());
return;
}
for(var i = 0; i < radioLength; i++) {
radioObj[i].checked = false;
if(radioObj[i].value == newValue.toString()) {
radioObj[i].checked = true;
}
}
}
function disp_alert()
{
alert("I am an alert box!!")
}
</SCRIPT>
</head>
<body>
<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>
<table>
<tr>
<td><input type="radio" name="abbr_letter" value="A"
onclick="submit()"A </td>
<td><input type="radio" name="abbr_letter" value="B"
onclick="submit()"B </td>
<td><input type="radio" name="abbr_letter" value="C"
onclick="submit()"C </td>
<td><input type="radio" name="abbr_letter" value="D"
onclick="submit()"D </td>
<td><input type="radio" name="abbr_letter" value="E"
onclick="submit()"E </td>
<td><input type="radio" name="abbr_letter" value="F"
onclick="submit()"F </td>
<td><input type="radio" name="abbr_letter" value="G"
onclick="submit()"G </td>
<td><input type="radio" name="abbr_letter" value="H"
onclick="submit()"H </td>
<td><input type="radio" name="abbr_letter" value="I"
onclick="submit()"I </td>
<td><input type="radio" name="abbr_letter" value="J"
onclick="submit()"J </td>
<td><input type="radio" name="abbr_letter" value="K"
onclick="submit()"K </td>
<td><input type="radio" name="abbr_letter" value="L"
onclick="submit()"L </td>
<td><input type="radio" name="abbr_letter" value="M"
onclick="submit()"M </td>
</tr>
<tr>
<td><input type="radio" name="abbr_letter" value="N"
onclick="submit()"N </td>
<td><input type="radio" name="abbr_letter" value="O"
onclick="submit()"O </td>
<td><input type="radio" name="abbr_letter" value="P"
onclick="submit()"P </td>
<td><input type="radio" name="abbr_letter" value="Q"
onclick="submit()"Q </td>
<td><input type="radio" name="abbr_letter" value="R"
onclick="submit()"R </td>
<td><input type="radio" name="abbr_letter" value="S"
onclick="submit()"S </td>
<td><input type="radio" name="abbr_letter" value="T"
onclick="submit()"T </td>
<td><input type="radio" name="abbr_letter" value="U"
onclick="submit()"U </td>
<td><input type="radio" name="abbr_letter" value="V"
onclick="submit()"V </td>
<td><input type="radio" name="abbr_letter" value="W"
onclick="submit()"W </td>
<td><input type="radio" name="abbr_letter" value="X"
onclick="submit()"X </td>
<td><input type="radio" name="abbr_letter" value="Y"
onclick="submit()"Y </td>
<td><input type="radio" name="abbr_letter" value="Z"
onclick="submit()"Z </td>
</tr>
</TABLE>
<input type="button" onclick="setCheckedValue('abbr_letter', 'V')"
value="Set Radio Button">
<input type="button" onclick="disp_alert()" value="Display alert box">
</FORM>
</body>


I rewrote the function and it works. I thought that the old function
should work..

function setCheckedValue(newValue) {
var len = document.author_abbrv.abbr_letter.length
for(var i = 0; i < len; i++) {
document.author_abbrv.abbr_letter[i].checked = false;
if(document.author_abbrv.abbr_letter[i].value ==
newValue.toString()) {
document.author_abbrv.abbr_letter[i].checked = true;
}
}
}
In the original function, you receive the *name* of the radio
group as the first argument, and try to treat that string
as if it were the Radio object. The name of the thing is not
the thing.
--

Nov 12 '06 #4
Lee wrote:
IchBin said:
>IchBin wrote:
>>I can not see what the problem is with this script. I am just trying to
set a radio button by calling setCheckedValue('abbr_letter', 'V'). Sorry
I am new to javascript.
<html>
<head>
<script type="text/javascript">
function setCheckedValue(radioObj, newValue) {
if(!radioObj)
return;

var radioLength = radioObj.length;
if(radioLength == undefined) {
radioObj.checked = (radioObj.value == newValue.toString());
return;
}
for(var i = 0; i < radioLength; i++) {
radioObj[i].checked = false;
if(radioObj[i].value == newValue.toString()) {
radioObj[i].checked = true;
}
}
}
function disp_alert()
{
alert("I am an alert box!!")
}
</SCRIPT>
</head>
<body>
<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>
<table>
<tr>
<td><input type="radio" name="abbr_letter" value="A"
onclick="submit()"A </td>
<td><input type="radio" name="abbr_letter" value="B"
onclick="submit()"B </td>
<td><input type="radio" name="abbr_letter" value="C"
onclick="submit()"C </td>
<td><input type="radio" name="abbr_letter" value="D"
onclick="submit()"D </td>
<td><input type="radio" name="abbr_letter" value="E"
onclick="submit()"E </td>
<td><input type="radio" name="abbr_letter" value="F"
onclick="submit()"F </td>
<td><input type="radio" name="abbr_letter" value="G"
onclick="submit()"G </td>
<td><input type="radio" name="abbr_letter" value="H"
onclick="submit()"H </td>
<td><input type="radio" name="abbr_letter" value="I"
onclick="submit()"I </td>
<td><input type="radio" name="abbr_letter" value="J"
onclick="submit()"J </td>
<td><input type="radio" name="abbr_letter" value="K"
onclick="submit()"K </td>
<td><input type="radio" name="abbr_letter" value="L"
onclick="submit()"L </td>
<td><input type="radio" name="abbr_letter" value="M"
onclick="submit()"M </td>
</tr>
<tr>
<td><input type="radio" name="abbr_letter" value="N"
onclick="submit()"N </td>
<td><input type="radio" name="abbr_letter" value="O"
onclick="submit()"O </td>
<td><input type="radio" name="abbr_letter" value="P"
onclick="submit()"P </td>
<td><input type="radio" name="abbr_letter" value="Q"
onclick="submit()"Q </td>
<td><input type="radio" name="abbr_letter" value="R"
onclick="submit()"R </td>
<td><input type="radio" name="abbr_letter" value="S"
onclick="submit()"S </td>
<td><input type="radio" name="abbr_letter" value="T"
onclick="submit()"T </td>
<td><input type="radio" name="abbr_letter" value="U"
onclick="submit()"U </td>
<td><input type="radio" name="abbr_letter" value="V"
onclick="submit()"V </td>
<td><input type="radio" name="abbr_letter" value="W"
onclick="submit()"W </td>
<td><input type="radio" name="abbr_letter" value="X"
onclick="submit()"X </td>
<td><input type="radio" name="abbr_letter" value="Y"
onclick="submit()"Y </td>
<td><input type="radio" name="abbr_letter" value="Z"
onclick="submit()"Z </td>
</tr>
</TABLE>
<input type="button" onclick="setCheckedValue('abbr_letter', 'V')"
value="Set Radio Button">
<input type="button" onclick="disp_alert()" value="Display alert box">
</FORM>
</body>

I rewrote the function and it works. I thought that the old function
should work..

function setCheckedValue(newValue) {
var len = document.author_abbrv.abbr_letter.length
for(var i = 0; i < len; i++) {
document.author_abbrv.abbr_letter[i].checked = false;
if(document.author_abbrv.abbr_letter[i].value ==
newValue.toString()) {
document.author_abbrv.abbr_letter[i].checked = true;
}
}
}

In the original function, you receive the *name* of the radio
group as the first argument, and try to treat that string
as if it were the Radio object. The name of the thing is not
the thing.

Thanks... Then how do I pass the reference to that Object to a
Javascript function?

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ____________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nov 12 '06 #5
Evertjan. wrote:
IchBin wrote on 12 nov 2006 in comp.lang.javascript:
> <b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>

Dear YouAre,

Why do you make bold an element part the does not display anything?
Sorry I do not understand your question... I am posting the selections
to a php var. from the php var I can pass that to the javascript
function. I just need to have the selected radio button available to php.

In this snip of code I am not using this action. This is why I hard
codded the call to the javascript function.

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ____________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nov 12 '06 #6
IchBin wrote on 12 nov 2006 in comp.lang.javascript:
Evertjan. wrote:
>IchBin wrote on 12 nov 2006 in comp.lang.javascript:
>> <b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>

Dear YouAre,

Why do you make bold an element part the does not display anything?

Sorry I do not understand your question...
The question is simple:

Why do you enclose the <form .. in <b... </b?

I am posting the selections
to a php var. from the php var I can pass that to the javascript
function. I just need to have the selected radio button available to php.

In this snip of code I am not using this action. This is why I hard
codded the call to the javascript function.
Eh?
Why post unused code in your question?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 12 '06 #7
IchBin wrote:
Lee wrote:
>IchBin said:
>>IchBin wrote:
I can not see what the problem is with this script. I am just trying
to set a radio button by calling setCheckedValue('abbr_letter',
'V'). Sorry I am new to javascript.
<html>
<head>
<script type="text/javascript">
function setCheckedValue(radioObj, newValue) {
if(!radioObj)
return;

var radioLength = radioObj.length;
if(radioLength == undefined) {
radioObj.checked = (radioObj.value == newValue.toString());
return;
}
for(var i = 0; i < radioLength; i++) {
radioObj[i].checked = false;
if(radioObj[i].value == newValue.toString()) {
radioObj[i].checked = true;
}
}
}
function disp_alert()
{
alert("I am an alert box!!")
}
</SCRIPT>
</head>
<body>
<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>
<table>
<tr>
<td><input type="radio" name="abbr_letter" value="A"
onclick="submit()"A </td>
<td><input type="radio" name="abbr_letter" value="B"
onclick="submit()"B </td>
<td><input type="radio" name="abbr_letter" value="C"
onclick="submit()"C </td>
<td><input type="radio" name="abbr_letter" value="D"
onclick="submit()"D </td>
<td><input type="radio" name="abbr_letter" value="E"
onclick="submit()"E </td>
<td><input type="radio" name="abbr_letter" value="F"
onclick="submit()"F </td>
<td><input type="radio" name="abbr_letter" value="G"
onclick="submit()"G </td>
<td><input type="radio" name="abbr_letter" value="H"
onclick="submit()"H </td>
<td><input type="radio" name="abbr_letter" value="I"
onclick="submit()"I </td>
<td><input type="radio" name="abbr_letter" value="J"
onclick="submit()"J </td>
<td><input type="radio" name="abbr_letter" value="K"
onclick="submit()"K </td>
<td><input type="radio" name="abbr_letter" value="L"
onclick="submit()"L </td>
<td><input type="radio" name="abbr_letter" value="M"
onclick="submit()"M </td>
</tr>
<tr>
<td><input type="radio" name="abbr_letter" value="N"
onclick="submit()"N </td>
<td><input type="radio" name="abbr_letter" value="O"
onclick="submit()"O </td>
<td><input type="radio" name="abbr_letter" value="P"
onclick="submit()"P </td>
<td><input type="radio" name="abbr_letter" value="Q"
onclick="submit()"Q </td>
<td><input type="radio" name="abbr_letter" value="R"
onclick="submit()"R </td>
<td><input type="radio" name="abbr_letter" value="S"
onclick="submit()"S </td>
<td><input type="radio" name="abbr_letter" value="T"
onclick="submit()"T </td>
<td><input type="radio" name="abbr_letter" value="U"
onclick="submit()"U </td>
<td><input type="radio" name="abbr_letter" value="V"
onclick="submit()"V </td>
<td><input type="radio" name="abbr_letter" value="W"
onclick="submit()"W </td>
<td><input type="radio" name="abbr_letter" value="X"
onclick="submit()"X </td>
<td><input type="radio" name="abbr_letter" value="Y"
onclick="submit()"Y </td>
<td><input type="radio" name="abbr_letter" value="Z"
onclick="submit()"Z </td>
</tr>
</TABLE>
<input type="button" onclick="setCheckedValue('abbr_letter',
'V')" value="Set Radio Button">
<input type="button" onclick="disp_alert()" value="Display alert
box">
</FORM>
</body>
I rewrote the function and it works. I thought that the old function
should work..

function setCheckedValue(newValue) {
var len = document.author_abbrv.abbr_letter.length
for(var i = 0; i < len; i++) {
document.author_abbrv.abbr_letter[i].checked = false;
if(document.author_abbrv.abbr_letter[i].value ==
newValue.toString()) {
document.author_abbrv.abbr_letter[i].checked = true;
}
}
}

In the original function, you receive the *name* of the radio
group as the first argument, and try to treat that string
as if it were the Radio object. The name of the thing is not
the thing.
Thanks... Then how do I pass the reference to that Object to a
Javascript function?
Thanks anyway... I found it:

setCheckedValue(document.author_abbrv.elements['abbr_letter'], 'S');

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ____________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nov 12 '06 #8
Evertjan. wrote:
IchBin wrote on 12 nov 2006 in comp.lang.javascript:
>Evertjan. wrote:
>>IchBin wrote on 12 nov 2006 in comp.lang.javascript:

<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>

Dear YouAre,

Why do you make bold an element part the does not display anything?
Sorry I do not understand your question...

The question is simple:

Why do you enclose the <form .. in <b... </b?

>I am posting the selections
to a php var. from the php var I can pass that to the javascript
function. I just need to have the selected radio button available to php.

In this snip of code I am not using this action. This is why I hard
codded the call to the javascript function.

Eh?
Why post unused code in your question?

Because it is really a php script and I missed it when I was stripping
it out to post an example! I am new to javascript/php and not
programming. Turns out it was a call from php that should resolve the
problem.

echo 'setCheckedValue("abbr_letter", "'.$_SESSION['abbr_letter'].'")';

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ____________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nov 12 '06 #9
IchBin wrote on 12 nov 2006 in comp.lang.javascript:
Evertjan. wrote:
>IchBin wrote on 12 nov 2006 in comp.lang.javascript:
>>Evertjan. wrote:
IchBin wrote on 12 nov 2006 in comp.lang.javascript:

<b><FORM NAME="author_abbrv" method="POST" action="<?php echo
$_SERVER['PHP_SELF'];?>"></b>
>
Dear YouAre,

Why do you make bold an element part the does not display anything?

Sorry I do not understand your question...

The question is simple:

Why do you enclose the <form .. in <b... </b?
And this?
>>I am posting the selections
to a php var. from the php var I can pass that to the javascript
function. I just need to have the selected radio button available to
php.

In this snip of code I am not using this action. This is why I hard
codded the call to the javascript function.

Eh?
Why post unused code in your question?

Because it is really a php script and I missed it when I was stripping
it out to post an example! I am new to javascript/php and not
programming. Turns out it was a call from php that should resolve the
problem.

echo 'setCheckedValue("abbr_letter",
"'.$_SESSION['abbr_letter'].'")';


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 12 '06 #10

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

Similar topics

4
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1>...
5
by: Digital Puer | last post by:
I have the following HTML form: - radio button A (default selected) - radio button B - input field, of type "file" with "Choose" button - submit button I would like to have it so that if the...
3
by: John Davis | last post by:
I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons. When the user click the first radio button, the text will change to uppercase. If the user clicks the other radio button,...
3
by: Amelyan | last post by:
When we want radio button to belong to a group name we say, radio1.GroupName="GroupA". In this case, radio1 will be unselected if another radio button is selected in "GroupA". Is there a way...
8
by: David Cameron | last post by:
I noticed that using an HTMLInputRadioButton and specifying a value to be an empty string (""), this is overridden by ASP.Net which set the value of the control to be the same as the ID of the...
10
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
1
by: thirunavukarasukm | last post by:
I have a link wich opens a the second page with links wich call a javascript function. I have some problem with javascript. i am two aspx page.. in my first aspx page contain the second...
11
by: nitha | last post by:
hi there...i need help... just wondering how to put a function? this is the form: <form> <p>Room type:<br/> <input type="radio" id="room1" name="room" onclick="roomCost=150"...
8
by: photoboy | last post by:
I have racked by brain long enough on this, so now I need the help of someone who knows what they are doing. Here is what I am trying to achieve: First, I have two radio buttons (both unchecked)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.