fyness
asked on
Forms and Javascript
Hi Experts,
I have an options form on a JSP that consist of multiple radio buttons, i'm trying to use javascript and i'm having trouble finding the property because the form uses transfer beans if name a property
<html:radio proptery="mytransferbean.g
as opposed to putting all the form attributes in the form directly
<html:radio proptery="getFromAttrubite
My javascript doesnt like nested names so
document.myForm.mytransfer
isnt found
Any ideas on how to solve this problem???? I've tried using
document.myForm.element[1]
Thanks!
Fynzy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
if i use getElementByName("") if i have 2 properties the same, both radio buttons can i call each one as normal
document.getForm.getAttrub
document.getForm.getAttrub
Thanks,
Suzy
yes you should be able to do that... if there are more objects of the same name, the fuction returns an array of objects.
ASKER
when i use getElementByName i get the following javascript error in firefox
document.myForm.getElement
ASKER
Got it working!
works with
document.getElementsByName
Thanks!
<html:radio proptery="mytransferbean.g
function callJavaScript (obj) {
alert(obj.value);
}