Selacius Posted December 16, 2005 Share Posted December 16, 2005 This is the code I am currently using to change the link direction of a button which follows. The only problem is I want the link to open in a new window, and also the new link does not have the *.html ending. Here is the codeCharacter Race:<td colspan=3> <select name="race"> <option> <option value=Humans>Humans <option value=Elves>Elves <option value=Orcs>Orcs <option value=Sprites>Sprites <option value=Treefolk>Treefolk</select><input type="button" onClick="location=document.stats.race.options[document.stats.race.selectedIndex].value;" value="Learn About Race">Now i would change the values to represent the html file but these values are needed in the form which this menu lies in. Link to comment Share on other sites More sharing options...
aspnetguy Posted December 16, 2005 Share Posted December 16, 2005 <input type="button" onClick="window.open(document.stats.race.options[document.stats.race.selectedIndex].value+'.html','newWindow','window args')" value="Learn About Race"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now