File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Create an object on the fly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Create an object on the fly" Watch "Create an object on the fly" New topic

Create an object on the fly

samuel marin

Joined: Nov 18, 2011
Posts: 24
I have a select with a OnChange Function. I would like to know how to create a different object depending on the selection on the Select.


MySelect have Option 1 and Option 2, so

I'm using the object under <body> and it's working, but when I'm trying to use it under a <script> does not work.

This is the object I'm trying to create: (It is a map) so what I'm trying is to change the values or map depending on the selection of the Select.

Thank you very much
It is sorta covered in the JavaRanch Style Guide.
subject: Create an object on the fly
It's not a secret anymore!