TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
L A
NA
170
171.6k
Type of parameter for called function
Jun 4 2018 1:32 PM
Hi,
I'm working of webform which have multiple html controls.
html
<
div
>
<
label
for
=
"ddlJobType"
>
Job Category
</
label
>
<
select
id
=
"ddlJobCategory"
class
=
"form-control"
onchange
=
"getselectedVal(
this
);"
>
</
select
>
<
label
for
=
"ddlJobType"
>
Job Type
</
label
>
<
select
id
=
"ddlJobType"
class
=
"form-control"
onchange
=
"getselectedVal(
this
);"
>
</
select
>
</
div
>
What parameter should be send to the called function? is parameter '
this
' an efficient way?
jQuery
function
getselectedVal(
**
what should be the argument type
**
){
alert(
'dropdown option:selected'
).val();
}
I want to use the same function to give details of selected dropdown value. What should be the parameter type to access the selected html control.
Reply
Answers (
3
)
How to find user's current location
Fill dropdownlist with value in groups (Master/content page)