• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
reply
    Bookmark Topic Watch Topic
  • New Topic