In this the JS Codes (in the code tag)are not working only in this page can any one help me on this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Luxmi Lanka</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="CSS/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="calendar/calendar.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript" src="js/js1.js"></script>
<script language="javascript" type="text/javascript" src="js/mootools.js"></script>
<script language="javascript" type="text/javascript" src="js/getchqno.js"></script>

</head>

<body onload="GetValues()">
<div id="body" >
<div id="head"><img src="images/banner.png" width="498" height="123" />
<div id="menutop">
    <ul>
        <li><a href="index.php"><span>&nbsp; Home&nbsp; </span></a></li>
        <li><a href="addsupcus.php"><span> &nbsp;Controll&nbsp; </span></a></li>

        <li><a href="report.php"><span> &nbsp;Reports&nbsp; </span></a></li>
        <li><a href="#"><span> &nbsp;Other&nbsp; </span></a></li>
    </ul>
</div>
</div>


<div id="content"><!-- InstanceBeginEditable name="EditRegion3" --><div id="sidemenu">
    <p><a href="index.php?supstatus=1&cusstatus=0">Supplier Transactions</a></p>
    <p><a href="index.php?supstatus=0&cusstatus=1">Coustomer Transactions</a></p>
    <p><a href="index.php?supstatus=0&cusstatus=1">Cheque</a></p>

</div>
<div id="divadd">

div for add informations
<div  id="cheqdes">
  <p><b>Clearence Cheques Of Today</b></p>
  <table width="185" border="0" bgcolor="#fff3ff" style="margin-left:auto; margin-right:auto;">
    <tr style="background-color: #eab8eb;" >
      <td width="95"><b>Name</b></td>
      <td width="74"><b>Ammount</b></td>
    </tr>
    <?php 
    include("init/db.php");
       $today=date("Y-m-d");
      $sql="SELECT *
FROM `cheques_details` where date='$today'";
$result=mysql_query($sql);
while($info=mysql_fetch_array($result)){
    $name=$info['name_of_owner'];
    $ammount=$info['ammount'];
    $id=$info['id'];
    $url="'chq/chqpopup.php?id=$id'";
     echo '<tr onclick="javascript:popUpchq('.$url.')" id="chqtb">
      <td>'.$name.'</td>
      <td>'.$ammount.'</td>
    </tr>';
    }

      ?>

  </table>
  <p>&nbsp;</p>
</div>

<script type="text/javascript">
function buildSelect(select, options)
{
    var select = $(select);
    select.empty();
    options.each(function(item) {
        if($type(item) != "array")
        {
            item = [item, item];
            var option = new Element("option", {
                text: item[0].toString(),
                value: item[1].toString()
            });
            option.inject(select);
        }
    });
}

function domready()
{
    $('master').addEvent('change', master_changed);
}

function master_changed()

{

    var req = new Request.JSON({
        url: 'getowner.php',
        method: 'post',
        data: 'id=' + encodeURIComponent($('master').get('value'))
    });
    req.addEvent('success', function(response) {
        buildSelect('slave', response);
    });
    req.send();
}
window.addEvent('domready', domready);
</script>
<div id="deks">desk
  <form action="" method="post" name="F2" id="F2" >
    <p>Make
      <select name="make" id="master">
        <option selected="selected" >d1</option>
        <?php
   include("init/db.php");
       $sql="SELECT *
FROM `customers`";

        $result=mysql_query($sql);
        while ($info=mysql_fetch_array($result)){
            $id= $info['id'];
            $name = $info['fname']." ".$info['lname'];
            echo '<option value="'.$id.'">'.$name.'</option>';
            }       

        ?>
      </select>
    </p>
    <p>Model
      <select name="model" id="slave">
        <option>SELECT</option>
      </select>
    </p>
  </form>
</div>




</div> <!-- InstanceEndEditable --></div>


</div>
</body>
<!-- InstanceEnd --></html>

Hey.

Can you explain this a little better? Just so we know what we are looking for.

The phrase "is not working" (in any form) is a completely useless statement when you are describing your problem. We already know it's not working. That is why you posted it. What we need to know is how it is supposed to be working and how it is actually working.

Thanks :)

Hey.

Can you explain this a little better? Just so we know what we are looking for.

The phrase "is not working" (in any form) is a completely useless statement when you are describing your problem. We already know it's not working. That is why you posted it. What we need to know is how it is supposed to be working and how it is actually working.

Thanks :)

im sorry about that

in this codes what i want to do is when i selected a value in master (select list/menu) and get the relevant data from db and put in to slave(select list/menu) thi codes are working without jquery.js file but the thing is i want jquery file also
thank you for the reply im sorry im not good in english

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.