This has nothing to do with security, but I know no better place to go for help (thanks AntiOnline), so I'm just posting this in the general section. I could really use some help with a javascript issue. I'm still early on in my learning of the script, so I can use all the help I can get.

Okay, I want to create a form with buttons that link to websites. Simple enough. The thing is I don't want to do it the typical way (having the link address in the "onclick" field). I want to have a javascript that defines an array in which each item of that array is a website address. So for instance, I want to create a button that goes to the first link in that array. In other words, if:

var links = new array(3);

So, I want the button in my HTML form to call a function that goes to one of those links. How do I do that?