Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies, Forms and Netscape OH MY!!

Status
Not open for further replies.

DigitalBoy

Programmer
Oct 11, 2000
87
US
I have a form (ratingsForm) that contains a group of radio buttons (ratingsGroup) of which I want to store the value of in a variable. I assume that the following syntax is correct:

var ratingsValue = document.ratingsForm.ratingsGroup.value;

However, whenever I try and run this, I always get the following from the javascript debugger window (in NS):

document.ratingsForm has no properties.

Um ... anyone have any suggestions?

- DB

dgtlby@excite.com
Administrator

UBB Developers Network

 
So NS does not even know the form is there? Check your syntax to make sure there is form tags, and they are in the right place.
b2 - benbiddington@surf4nix.com
 
Ok, it took myself and another programmer a bit to work out, but we got it. Basically, the way I had to reference it was as an ARRAY like this:

document.forms[0].ratingsGroup[0].value

That would get me the value of the first radio button in the group. Confusing, but it does work.

- DB

dgtlby@excite.com
Administrator

UBB Developers Network

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top