Click to See Complete Forum and Search --> : element not defined error


vicpal25
07-07-2005, 12:03 PM
I am working on a dynamic form that if you click on a radio button, a td tag within a table shows and shows a form element that is within. I if you notice I have a paypal radio that when its clicked it should show a targeted td tag to show style visible..here is my code:


<tr>
<td width="90%">
Paypal <input type="radio" value="paypal" name="payment" onclick="this.checked='true';cell1.style.visibility='visible';cell2.style.visibility='visible'" />
Tarjeta de Credito <input type="radio" value="creditcard" name="payment" />
Cheque <input type="radio" value="check" name="payment" />
Money Order <input type="radio" value="moneyorder" name="payment" />
Otro Metodo <input type="radio" value="other" name="payment" />
</td>
<tr><td class=formtext name="cell1" style='visibility:hidden'>Price:</td>
<td class=formtext name="cell2" style='visibility:hidden'><input name=button1 type=text></td></tr>


does anyone know or sees anything that I am missing..I get a "cell1 is not defined error" on Ie6 and firefox..help!

A1ien51
07-07-2005, 12:07 PM
document.getElementById("cell1").style.visibility

vicpal25
07-07-2005, 12:12 PM
Now i get a en error that says "OBJECT REQUIRED" ON IE6 AND ON FIREFOX IT SAYS THT CELL1 HAS NO PROPERTIES...HUMMM..

A1ien51
07-07-2005, 12:14 PM
well id should be using an id and not a name attribute on the cell.

Eric

vicpal25
07-07-2005, 12:15 PM
Whammm That Did It! Thanks! :)