Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Posts
    19
    Plugin Contributions
    0

    Default Calendar Control

    Is there any sort of instruction on adding calendar controls to Zen-cart web pages?

    I am trying to create a pop-up calendar control for a date field on a report. I found several other admin pages that use a calendar pop-up using spiffycal v 2.1, and attempted to copy the code for their calendar code into another form.

    At this point, the control is displayed on the screen; however, it is not functional. Clicking on the icon that should actually show the calendar box does nothing, in both IE and Firefox. (In Internet Explorer, it generates a javascript error:
    Error: 'document.all[...].style' is null or not an object

    I figure I've forgotten to include some file or set some variable but can't figure out what.

    Or, is spiffycal the best option for calendar controls?

  2. #2
    Join Date
    Oct 2007
    Posts
    19
    Plugin Contributions
    0

    Default Re: Calendar Control

    By the way, here is a copy of the code which demonstrates the problem I'm having:
    Code:
    <?php
      require('includes/application_top.php');
    
      require(DIR_WS_CLASSES . 'currencies.php');
    
      include(DIR_WS_CLASSES . 'order.php');
      
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
    <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
    <link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">
    <script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
    <script language="javascript" src="includes/menu.js"></script>
    <script language="javascript" src="includes/general.js"></script>
    <script type="text/javascript">
      <!--
      function init()
      {
        cssjsmenu('navbar');
        if (document.getElementById)
        {
          var kill = document.getElementById('hoverJS');
          kill.disabled = true;
        }
      }
      function popupWindow(url) {
      window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=600,height=460,screenX=150,screenY=150,top=150,left=150')
      }
      // -->
    </script>
    </head>
    <body onload="init()">
    <!-- header //-->
    <?php
      require(DIR_WS_INCLUDES . 'header.php');
    ?>
    <!-- header_eof //-->
    <!-- body //-->
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
      <tr>
    <!-- body_text //-->
        <td>
    
          <tr>
            <td class="pageHeading"><?php echo "<STRONG>Test</STRONG>"; ?></td>
          </tr>
    
          <tr>
            <td><table border="0" cellspacing="0" cellpadding="0">
    
    
    
              <tr>
                <td><table border="0" width=550 cellspacing="2" cellpadding="2">
                  <tr><?php echo zen_draw_form('search', FILENAME_STATS_ORDER_LISTING, '', 'get'); echo zen_draw_hidden_field('referral_code', $_GET['referral_code']); ?>
    				  <td class="main"><?php echo zen_image_submit('button_display.gif', IMAGE_DISPLAY); ?></td>
    			   </tr>
     <tr>
     <script language="javascript">
    var StartDate = new ctlSpiffyCalendarBox("StartDate", "search", "start", "btnDate1","<?php echo ('2001-01-01') ; ?>",scBTNMODE_CUSTOMBLUE);
    </script>
    
        <td class="main"><?php echo "Test Start Date"; ?>&nbsp;</td>
        <td class="main"><script language="javascript">StartDate.writeControl(); StartDate.dateFormat="<?php echo DATE_FORMAT_SPIFFYCAL; ?>";</script></td>
     </tr>
                  </td></table>
                  </form>
              </tr>
    
            </table></td>
          </tr>
        </td>
      </tr>
    </table>
    In Firefox I am getting the following javascript error on my console:
    document.getElementByID(""+id+"") has no properties.
    (However, when I view the value of 'id', it comes up with spiffycal).

 

 

Similar Threads

  1. v150 Calendar ???
    By maperr55 in forum General Questions
    Replies: 5
    Last Post: 10 Sep 2012, 09:50 PM
  2. Events Calendar
    By pixelpadre in forum Addon Sideboxes
    Replies: 1
    Last Post: 5 Apr 2010, 06:01 PM
  3. Calendar
    By startrek in forum General Questions
    Replies: 5
    Last Post: 28 May 2007, 07:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg