A friend of mine is trying to make a pretty much all-inclusive D&D character creater local web page. He'd like it dynamic so you can load/save characters, but that's beyond both of our scopes right now. What I'm trying to do is figure out and refine how to create a new page based on options selected form a drop down box.Here's my current code:
<HTML><HEAD><script TYPE="text/javascript">function CharCreate(){var Name=prompt("Name Your Character","")var race=document.getElementById("Race")var race=race.options[race.selectedIndex].textvar class=document.getElementById("Class")var class=class.options[class.selectedIndex].textdocument.write(<FONT SIZE=10><B><CENTER> + "Dungeons and Dragons Character Creator" + "<BR></CENTER></B></FONT><BR> + "Name:" + name + "<BR>Race: " + race + "<BR>Class: " + class)}</SCRIPT></HEAD><BODY><FORM><SELECT ID="Race"><OPTION SELECTED>~~~RACE~~~<OPTION>Human<OPTION>Elf<OPTION>Half-Elf<OPTION>Orc<OPTION>Halfling</SELECT><SELECT ID="Class"><OPTION SELECTED>~~~CLASS~~~<OPTION>Fighter<OPTION>Monk<OPTION>Sorceror<OPTION>Wizard<OPTION>Rogue<OPTION>Cleric<OPTION>Druid</SELECTED><BR><INPUT TYPE="button" VALUE="Make Character" onClick="CharCreate()">
When I click the button nothing happens. Also, what command would I use to make it open and create a new page instead of trying to overwrite the current page?