Start New Discussion within our Web Development Community

Hi, I just started javascript.
I want to put a radio button into an array I have done this so far:
var blocks = new Array("<input type="radio" name="" value="1">","2","3","4","5","6","7","8","9");
however this isn't working.
I suspect that I need to change the 'mode' to html somehow?

<script type="text/javascript">

// setup
var blocks = new Array("<html><input type="radio" name="" value="1"></html>","2","3","4","5","6","7","8","9");
var board = new Array("["+blocks[0]+"]","["+blocks[1]+"]",
                      "["+blocks[2]+"] <br />",
                      "["+blocks[5]+"] <br />",

// functions
function writeboard(blocks,board){

<input type="text" name="input">

Man, I have no idea of what you trying to do. Your code doesn't make any sense to me.
You want to have an array and create radio buttons, is that it? I mean, if there 10 itens in the array you want 10 radio buttons?

This article has been dead for over six months. Start a new discussion instead.