www.webdeveloper.com
Results 1 to 3 of 3

Thread: calendar not working

  1. #1
    Join Date
    Sep 2009
    Posts
    8

    calendar not working

    Code:
     <?
    
    if (isset($_COOKIE["ValidUserAdmin"])) 
      {
    require "config.php";
    require "config1.php";// connection to database 
    include "header_purchase.php";
    
    
    $auth = ($_COOKIE["ValidUserAdmin"]);
       $sys_date1= date("Y/m/d");
     ?>
    <html><head><title></title>
    
    
    
    <style rel="stylesheet" type="text/css">
    table.calendar {
      font-family: Helvetica, Arial, sans-serif;
      font-size: 0.8em;
      border-collapse: collapse;
      background-color: white;
      border: solid #999999 1px;
      background-color: white;
      width: 200px;
      text-align: center;
      /*prevent user from selecting text in Mozilla & Safari - check calendar constructor for IE code)*/
      -moz-user-select: none;
        /*-khtml-user-select: none;*/
    }
    table.calendar input, table.calendar select {
      font-size: 10px;
    }
    table.calendar td {
      border: 0;
      font-size: 10px;
      text-align: center;
    }
    div.mainheading {
      margin: 2px;
    }
    table.caldayheading {
      border-collapse: collapse;
      cursor: pointer;
      empty-cells: show;
      margin: 0 6px 0 6px;
    }
    table.caldayheading td {
      border: solid #CCCCCC 1px;
      text-align: left;
      color: #0054E3;
      font-weight: bold;
      width: 22px; /*should match calendar cell's width*/
    }
    table.caldayheading td.wkhead {
      border-right: double #CCCCCC 3px;
    }
    table.calcells {
      border-collapse: collapse;
      cursor: pointer;
      margin: 0 6px 0 6px;
    }
    table.calcells td {
      border: solid #CCCCCC 1px;
      vertical-align: top;
      text-align: left;
      font-weight: bold;
      width: 22px;
      height: 20px; /*IE doesn't like ems*/
    }
    table.calcells td div {
      padding: 1px;
      margin: 0;
    }
    table.calcells td.wkhead {
      background-color: white;
      text-align: center;
      border-right: double #CCCCCC 3px;
      color: #0054E3;
    }
    table.calcells td.wkday {
      background-color: #DDDDDD;
    }
    table.calcells td.wkend {
      background-color: #DDDDDD;    
    }
    table.calcells td.curdate {
    
    }
    table.calcells td.cell_selected {
      background-color: #99CCFF;
      color: black;
    }
    table.calcells td.notmnth {
      background-color: #FFFFFF;
      color: #CCCCCC;
    }
    table.calcells td.notallowed {
      background-color: white;
      color: #EEEEEE;
      font-style: italic;
    }
    table.calcells td.hover {
      background-color: #999999;
    }
    
    </style>
      
    
     <script type="text/javascript" src="calendar.js"></script>
    <script type="text/javascript">
      var bas_cal,dp_cal,ms_cal;      
    window.onload = function () {
      dp_cal  = new Epoch('epoch_popup','popup',document.getElementById('sale_date'));
       dp_cal  = new Epoch('epoch_popup','popup',document.getElementById('invc_date'));
    }
    
    </script>
    
    
    
     <script language="JavaScript" src="gen_validatorv31.js" type="text/javascript"></script>
    
    </head>
    <body >
    <table id="page">
    <tr><td>
     <br>
     <a name="AddNew"></a>
     Enter the details on the new Outgoing Transaction in the spaces below. You only need to add the amount in Rs click on the 'Add Outgoing' button.<br>
                            <BR> <form name="form1" method="post">
                              <input name="op" type="hidden" value="OutgoingTransactionAdd">
                              <input name="DateAdded" type="hidden" value="<?php print "$dateadded"; ?>">
                               <TABLE class="tbl" width="100%" ALIGN="CENTER" CELLPADDING="0" CELLSPACING="1" BGCOLOR="#E4EEE3"> 
    						 
    								    <TR>
                                        <TD colspan="4"><strong>Purchase Details </strong></TD>
                                                
                                      </TR>
    								  <TR>
                                        <TD BGCOLOR="#FFFFFF">Vendor <span style="color:#FF0000"> * </span></TD>
            <TD BGCOLOR="#FFFFFF">&nbsp;<?	$query1 = "SELECT distinct ven_name from aa_vendor1 where cleared='cleared' ";
    					$result1 = mysql_query($query1);
    	if(!$result1)
    		{ 
    		 echo "The query failed " . mysql_error();
    	    } else {
    	echo "<select name='dropdown1' onChange='AjaxFunction(document.form1.dropdown1.options[document.form1.dropdown1.selectedIndex].text);'>";
       ?> <option value=""> Select One </option> <?
    	while($row = mysql_fetch_array($result1, MYSQL_ASSOC))
        {
           $select= $row['Bank_custom']; 
         echo"<option value='". $row['ven_name']."'>" .$row['ven_name'] . "</option>";
     		}   
     echo"</select>";
    		}   						
    ?>
                                         </TD>
    									 <td bgcolor="#FFFFFF">Product <span style="color:#FF0000"> * </span></td>
    									 <td bgcolor="#FFFFFF">&nbsp;<select name="product"> </select></td>
                                      </TR>   
    								
    								  <TR>
                                        <TD BGCOLOR="#FFFFFF">Vendor Invoice No <span style="color:#FF0000"> * </span></TD>
                                        <TD BGCOLOR="#FFFFFF">&nbsp;<input type="TEXT" name="ven_inv_no" size="15" maxlength="15"></TD>
    									<td bgcolor="#FFFFFF">Invoice Amount <span style="color:#FF0000"> * </span></td>
    									 <td bgcolor="#FFFFFF">&nbsp;<input type="TEXT" name="ven_inv_amnt" size="15" maxlength="15"></td>
                                      </TR>
    								  
    								  <TR>
                                        <TD BGCOLOR="#FFFFFF">Invoice Date <span style="color:#FF0000"> * </span></TD>
                         <TD BGCOLOR="#FFFFFF" colspan="3">&nbsp;<INPUT id="invc_date" NAME="invc_date" TYPE="text" size="15" readonly="yes" />
    					 <INPUT NAME="rec_date" TYPE="hidden" size="20" value="<? echo $todaydate ?>" /></TD>
                                       </TR>
    								   
    					<TR>  
                            <TD BGCOLOR="#FFFFFF"> Comments </TD>
    						<TD BGCOLOR="#FFFFFF" colspan="3"> 						   
    						 <span>&nbsp;</span><textarea  white-space:nowrap;overflow:auto; rows="3" cols="40" type="TEXT" name="comment_prchs"></textarea>
    					     </TD>
                             </TR>
    								  
    	 <TR> <TD colspan="4"><a name="AddNew"><strong>Sale Details </strong></a></TD> </TR>
                               <TR>
                                        <TD height="24" BGCOLOR="#FFFFFF">Client Name <span style="color:#FF0000"> * </span></TD>
                                 <TD BGCOLOR="#FFFFFF">&nbsp;<input type="text" name="client_name" size="30" onClick="make_blank();"></TD>
    								   <TD BGCOLOR="#FFFFFF">Sale Invoice No <span style="color:#FF0000"> * </span></TD>
                                        <TD  BGCOLOR="#FFFFFF">&nbsp;<input type="TEXT" name="sales_inv_no" size="15"> </TD>
    						     </TR>
    									
    							
    								   <TR>
                                        <TD BGCOLOR="#FFFFFF">Sale Amount <span style="color:#FF0000"> * </span></TD>
                                        <TD BGCOLOR="#FFFFFF">&nbsp;<input type="TEXT" name="sale_amt" size="15" > </TD>
    									<TD BGCOLOR="#FFFFFF">Sale Date <span style="color:#FF0000"> * </span></TD>
                                        <TD  BGCOLOR="#FFFFFF">&nbsp;<INPUT id="sale_date" NAME="sale_date" TYPE="text" size="15" readonly="yes" /></TD>
                                </TR>
    												  
    						<TR>
                                        <TD BGCOLOR="#FFFFFF">Status <span style="color:#FF0000"> * </span></TD>
                <TD BGCOLOR="#FFFFFF">&nbsp;<select id="sts" name="status" onChange="paid(document.form1.status.options[document.form1.status.selectedIndex].text);">
                                            <option>Pending</option>
    										<option>Paid</option>
    										<option>Defaulted</option>
    										</select>
    		    </TD>
    			<td bgcolor="#FFFFFF"><div id="rcp1" style="display:none">Receipt<span style="color:#FF0000"> * </span></div></td>
    			<td bgcolor="#FFFFFF"><div id="rcp2" style="display:none">&nbsp;<input id="rcp3" type="TEXT" name="receipt" size="15" ></div></td>
                 </TR>								  
    							 <TR>  
                                  <TD BGCOLOR="#FFFFFF"> Comments </TD>
    						<TD BGCOLOR="#FFFFFF" colspan="3"> 						   
    					 <span>&nbsp;</span><textarea  white-space:nowrap;overflow:auto; rows="3" cols="40" type="TEXT" name="comment1" ></textarea>
          </TD>
                                       </TR>
    					<TR>        
    							  <TD align="center" colspan="4"> <input name="SUBMIT" type="SUBMIT" value="Add" onClick="return validate();"></TD>
    						    </TR>
                              </TABLE>
                            </FORM>

  2. #2
    Join Date
    Jan 2009
    Posts
    3,346
    What "isn't working" about it? Are you getting an error or just unexpected behavior?

  3. #3
    Join Date
    Jul 2009
    Location
    Falls Church, Va.
    Posts
    780
    Of course all calendars will stop working on December 21, 2012.



    (waiting for chocoboy to add more details.... twiddling thumbs...)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles