Hi All,

This should be an easy one. I am using a single OnChange event with several <Select> statements, and need to identify the specific <Select> control that fired off the onchange event. I'm certain there must be a way to grab the ID or Name from the specific control in the javascript function, but I haven't been able to find it. Any thoughts?

Thanks,
Jim

Recommended Answers

All 2 Replies

Why dont you just send the name of the element or id of the element in to the onchange function, send the element using "this", so the function call could be something like this :

... onchange="callMe('elementId')"

or

... onchange="callMe(this)"

Then inside the callMe function u will then have the element ID or the element object available to you.

Doh! Perhaps it was late, or maybe I was having a senior moment... either way this is a good reminder to think outside the box rather than force things as I see them. Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.