View Single Post
Old 09-02-2006, 03:11 PM   #4
plix
Game freak

 
Join Date: Oct 2005
Location: ,
Posts: 113
Default

Regardless of the style of the file, you'll want to end up with an array of hints. Then it's as simple as
Code:
$array[mt_rand(0,count($array))];
(mt_rand() is better than the old rand(), but the latter would still work).

For your second problem Mara's suggestion isn't quite right. If you wish to use the DOM (as that example does, though it precludes older browsers), then what you want is actually more along the lines of
Code:
document.getElementById('id_attribute_value_of_the_radio_button').checked = true
though this would require that you set a unique ID for each of the radio buttons. I'll leave the actual placement of that statement as an excercise for the reader.
plix is offline                         Send a private message to plix
Reply With Quote