Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8862865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:49:56+00:00 2026-06-14T15:49:56+00:00

I have code: <div id=displayData_length class=dataTables_length> <label> Show <select name=displayData_length size=1 aria-controls=displayData> <option value=10

  • 0

I have code:

<div id="displayData_length" class="dataTables_length">
  <label>
     Show <select name="displayData_length" size="1" aria-controls="displayData">
             <option value="10" selected="selected">10</option>
             <option value="25">25</option>
             <option value="50">50</option>
             <option value="100">100</option>
           </select>
  </label>
</div>

When I select option I want use alert() and display value. My code:

$(document).ready(function() {
    $('select[name=displayData_length]').bind('change', function(event) {
            alert(this.val());
        });
 });

But is not good, what is wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:49:58+00:00Added an answer on June 14, 2026 at 3:49 pm

    Should be like this:

    $('select[name=displayData_length]').bind('change', function(event) {
        alert($(this).val());
    });
    

    In jQuery event handlers, this always points to DOM element, not wrapped with jQuery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have following code to show div on page <div id=all_users> <div id=user11 userid=11
I have code similar to the following: <div class=container> <div class=overlay> // hover content
I have code: <th colspan=3 /> <div class=l_table_th /></div> <div class=c_table_th />Zamów pakiet punktów</div>
So I have this code: jQuery('div[class=someClass] :input:not(:button)').each(function() { if (input type is drop-down) {
I have the following code : $('div[class^=locked_]').click(function() { var newThis = $(this) ; $(this).load(url
I have code <div class=row1> <em>My text</em> </div> How can I make a link
I have this code: $(div#element).hide(fast); $(div#aelement-2).show(fast); How can I make #aelement-2 fade in after
I have code like below: <div id=container> <div class=item id=1>blah blah</div> <div class=item id=2>blah
I have code similar to the below <form action=/u method=post> <div class=reply> <input type=hidden
I have code like this: <div class='outer'> <div class='imgwrapper'><img /></div> <div class='caption'>This is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.