...

View Full Version : HTML Drop down menus and Java Applets



aBoolean77
08-13-2011, 02:21 PM
I wasn't sure where to post this, as Java Applets can be seen within the HTML field, if this is the wrong section please feel free to move/remove it

Anyway, I was thinking. I wanted to have a page with 2 drop-down menus with 2 options in each, along with a submit button.

But it became harder due to myself being a beginner within html :eek:, that I wanted the 2 options within the drop downs to pass over variables of which would alter the Java Applet by parameters. :confused:

I've included an annotated demo picture below, if you don't quite understand my notion, please take a look at it:

http://img695.imageshack.us/img695/2199/htmljavaapplet.png
^Excuse some grammar mistakes, was in a hurry.

Thank you a bunch :)

sunfighter
08-13-2011, 06:28 PM
programming select and options is basic read:
http://www.w3schools.com/tags/tag_option.asp
then google for more info

But I would use all four options in one select and use the onchange. This gives one select menu and eliminates the submit button.


<select id="myId" onchange="alert('you made your selection. Its number '+value);">
<option>Choose One</option>
<option value='1'>arial red</option>
<option value='2'>arial black</option>
<option value='3'>courier red</option>
<option value='4'>courier black</option>
</select>

onchange should direct this to you applet.

aBoolean77
08-13-2011, 08:23 PM
programming select and options is basic read:
http://www.w3schools.com/tags/tag_option.asp
then google for more info

But I would use all four options in one select and use the onchange. This gives one select menu and eliminates the submit button.


<select id="myId" onchange="alert('you made your selection. Its number '+value);">
<option>Choose One</option>
<option value='1'>arial red</option>
<option value='2'>arial black</option>
<option value='3'>courier red</option>
<option value='4'>courier black</option>
</select>

onchange should direct this to you applet.
Thanks a lot, I will try this.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum