passing form values btwn functions

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()"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top