Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
get the selected value of dropdown box when button is clicked in row
reddy raja
Greenhorn
Posts: 17
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi ,
Can anybody help me i want to know the value present in drop down box when a button is clicked in that row only.
i am not able to capture the clicked button they will have same attributes for EX:
function samplefun(){ var x=document.forms[0].sample.length; for(var i=0;i<x;i++){ if(document.forms[0].sample.selectedIndex){ alert("clicked"+i); } } } <form id="myform"> <table> <tr> <td><input type="button" name="sample" id="sample" onclick="samplefun()"/></td> <td> <select id="sel"> <option label="SELECT" selected="selected">--Select--</option> <option label="one">one</option> <option label="two">two</option> </select> </td> </tr> <tr> <td><input type="button" name="sample" id="sample" onclick="samplefun()"/></td> <td> <select id="sel"> <option label="SELECT" selected="selected">--Select--</option> <option label="one">one</option> <option label="two">two</option> </select> </td> </tr> </table>
can anyone help me
Bear Bibeault
Sheriff
Posts: 67753
173
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Please
UseCodeTags
and indent your code properly. I will not read unformatted code.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
David Newton
Author
Posts: 12617
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
To be fair, it was almost worth reading for "butfun".
it's a teeny, tiny, wafer thin ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
spaces while populating using s:iterator
storing the added rows of table value in database from a jsp page
Passing array values using Ajax & JSP
Getting error
Struts 2 <s:submit action > and javascript help
More...