• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Get the selected value and create a dynamic table in Javascript

 
Greenhorn
Posts: 22
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm making a webpage, where in there is a dropdown and I select that value and hit click.

There is a javascript function containing some variables with the same ID as that of the dropdown values(option id). And there is an array of the same variables declared. Once I hit the click button i want the value that is selected in the dropdown, to be matched with the variable in variable array created and alert the same.

Currently it is not alerting any, if i add an else block, that gets triggered. Below is my JS.


And here is my full code in fiddle.

JSFiddle

please let me know how can i compare and get the correct result in the alert box.

Further i need to create a dynamic table here based on the data.

Thanks,
Marsoni
 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic