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 7531455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:10:35+00:00 2026-05-30T05:10:35+00:00

I have this script: <script type=’text/javascript’ src=’js/jquery-1.4.4.mi.js’></script> <script type=’text/javascript’> $(‘.filterMonth’).change(function(){ alert(‘ijijiji’); $.ajax({ url: ‘ajax/filterMandays.php’,

  • 0

I have this script:

<script type='text/javascript' src='js/jquery-1.4.4.mi.js'></script>
<script type='text/javascript'>
 $('.filterMonth').change(function(){ 
alert('ijijiji');
$.ajax({ 
url: 'ajax/filterMandays.php', 
//type: 'GET', 
success: function(data){ 
  //data is returned back 
  $('#mandayTable').html(data); 
} 
}); 

}); 
</script>

and this html:

<select name ="filterMonth">
        <?php
        $array_month = array("January","February","March","April","May","June","July","August","September","October","November","December");

        foreach($array_month as $key => $month)
        {
            $value_month = $key+1;
        echo "<option value = '$value_month'>$month</option>";
        }

        ?>
        </select>
        -
        <select name = "filterYear" onChange = "filter(filterMonth.value, filterYear.value)">
        <?php
        $curYear = date('Y');
        for($i = 1990; $i<=$curYear+10; $i++)
        {
        if($i == $curYear)
        {
        echo "<option value = '$i' selected = 'selected'>$i</option>";
        }
        else
        {
        echo "<option value = '$i'>$i</option>";
        }
        }
        ?>
        </select>
        </td>
        </tr>
        </br>
        </br>
        <tr>
        <div id="mandayTable"></div>

and this php page:

<?php
include("all.php");


        $q = "SELECT md.mandays_id,md.employeenum,md.month,md.year,md.required_man_days,d.firstname,d.lastname 
        FROM tbl_mandays md,tbl_employee_details d 
        WHERE md.active = '1' 
        AND md.employeenum = d.employeenum 
        AND md.month = '10';";



        $res = $db->Execute($q);

        echo "<table border = 1>";

        echo "<tr><th>Employee Number</th><th>First Name</th><th>Last Name</th><th>Month-Year</th><th>Required Man Days</th><th>Edit/Delete</th></tr>";

        while($rows = $res->FetchRow()) 
        //for($i=0;$i<5;$i++)
        {
                        //iterating through // check if employee 
                        // // if(isset($row[])) {           }
                        $mandays_id = $rows[0];

                        $empnum = $rows[1];

                        $month_year = $rows[2] ."-" .$rows[3];

                        $required_man_days = $rows[4];

                        $firstname = $rows['month'];

                        $lastname = $rows[6];




                        //echo approvers here are not taken
                        //<a href=\"view_team.php?id=".$empnum."\" -> for someone to view the people beneath them (like org tree)
                        echo "<tr><td>".$empnum  . "</td><td>".$firstname ."</td><td>".$lastname ."</td><td>" . $month_year ."</td><td>" .$required_man_days  . "</td><td width = \"200\" align = \"center\"><a href = 'edit_mandays.php?mandays_id=$mandays_id');'>Edit/Delete</a></td></tr>";
        }



        echo "</table>";


        ?>

the script should basically load the php page in the div in the html once the “filterMonth” has been changed. but it doesn’t work.

what seems to be the problem? 🙁

  • 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-05-30T05:10:36+00:00Added an answer on May 30, 2026 at 5:10 am

    The selector in your jQuery is $('.filterMonth') but your select box doesn’t have the filterMonth class. You need to change it to $('select[name=filterMonth]').

    In order for the jQuery selector to contain your select, you need to make sure that it runs after the Select element is in the DOM (ie: lower down the HTML), or run your JavaScript once the document has finished loading, for example:

    <script type='text/javascript' src='js/jquery-1.4.4.mi.js'></script>
    <script type='text/javascript'>
      jQuery(function() {
        // do your DOM selections here, this function only runs once the document is loaded
      });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this piece of javascript: <script type=text/javascript> function show_confirm() { var type =
I have this code: <script type=text/javascript> function js() { var getJs = document.getElementById(jogo); if
I have this script loaded on a page: (function() { window.alert('bookmarklet started'); function AjaxSuccess(data,
I have this script which is used to append: function append_place(type) { var shop_type
I have this jquery script: $('[id^=changesetList] tr').each(function () { var sid = $(this).attr('sid'); $(this).find('td
I have this simple jQuery code $(document).ready(function() { $('#test').attr('value','hello world'); $('#test1').text('hello world'); }); And
In my document I have this script: $.ajax({ type:POST,url:ajax.php,data:data, success: function() { //onsuccess },
The code is like this: var script = document.createElement('script'); //script.type = 'text/javascript'; // do
How to do a doOnce function? I have this jQuery script and I want
i have this script <select> <option value=1>one<img src=star.gif height=15 width=15></img> </option> </select> but it

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.