G
glm
I'm getting stuck at what I thought would be easy.
I'm creating an admin screen that allows users to reorder a screen
full of photos (the SQL is done, working on the user interface).
I want the user to be able to mouseover an image and put the image's
value in a select box, then click on a radio button and the next time
the user mouses over an image it fills another select box.
I have the mouseover part done. The user mouseovers images the select
box changes with the mouseovers. Now I want to be able to pass a radio
button parameter telling the function to fill the other select box.
EXAMPLE:
[photo1][photo2][photo3]
--Start---------------End
-<radio1>-----------<radio2>
<selectBox>--------<selectBox2>
I have it working for one -- but am unable to pass the radio button
value.
<script language="javascript" type="text/javascript">
function getInputValue()
{
var i = document.forms[0].getButtonValue;
}
function selectPhoto(which)
{
var i = getInputValue();
if (i == '0')
{
document.forms[0].selectBoxA.selectedIndex = which;
}
else
{
document.forms[0].selectBoxB.selectedIndex = which;
}
}
</script>
All I get is that input value is undefined.
The radio buttons have a onClick="getInputValue()"
as does the body onLoad="getInputValue()"
I'm creating an admin screen that allows users to reorder a screen
full of photos (the SQL is done, working on the user interface).
I want the user to be able to mouseover an image and put the image's
value in a select box, then click on a radio button and the next time
the user mouses over an image it fills another select box.
I have the mouseover part done. The user mouseovers images the select
box changes with the mouseovers. Now I want to be able to pass a radio
button parameter telling the function to fill the other select box.
EXAMPLE:
[photo1][photo2][photo3]
--Start---------------End
-<radio1>-----------<radio2>
<selectBox>--------<selectBox2>
I have it working for one -- but am unable to pass the radio button
value.
<script language="javascript" type="text/javascript">
function getInputValue()
{
var i = document.forms[0].getButtonValue;
}
function selectPhoto(which)
{
var i = getInputValue();
if (i == '0')
{
document.forms[0].selectBoxA.selectedIndex = which;
}
else
{
document.forms[0].selectBoxB.selectedIndex = which;
}
}
</script>
All I get is that input value is undefined.
The radio buttons have a onClick="getInputValue()"
as does the body onLoad="getInputValue()"