Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

working on tables

Status
Not open for further replies.

misslois74

Programmer
Sep 27, 2008
63
PH
im currently working on my events calendar and im having a problem conceptualizing the design in which whenever i click on a particular day for instance which is in a cell of a table other than the display of the actual date it should display certain icon which has link to other pages on mouseover and onmouseout those icons should disappear
 
I'm working on an interesting project at the moment where I have to dynamically display error messages on a field by field basis when the user tabs through a form. I use some of the same events as you are using.

Cheers,
Jeff

[tt]Visit my blog [!]@[/!] Visit Code Couch [!]@[/!] [/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
so does it mean that i would just be using javascript and CSS in this design?
 
ok i would lke to share my code since its acting weird and i cant figure it out im using php with javacript actually, my onmouseover and onmouseout is doing just fine in terms of displaying the icons but its only displaying on the first cell but not on the remaining cells what could be the problem on this:

Code:
<table width="100%">
    <tr valign="top">
<?php
  for ($dow = $firstDayOfWeek; $dow < $lastDayOfWeek; $dow++) {
    if (in_array($dow > $daysInWeek ? $dow - $daysInWeek : $dow, array(1, 7))) {
      $dow_class = "weekend";
    } else {
      $dow_class = "weekday";
    }
?>
      <th class="<?php echo $dow_class; ?>"><?php echo clean(lang(sprintf('dow %u', $dow > $daysInWeek ? $dow - $daysInWeek : $dow))); ?></th>
<?php
  } // for
?>
    </tr>
    <tr valign="top">
<?php

  /*
   * Skip days from previous month.
   */

  for ($dow = $firstDayOfWeek; $dow <= $firstDayOfMonth; $dow++) {
    if (in_array($dow > $daysInWeek ? $dow - $daysInWeek : $dow, array(1, 7))) {
      $dow_class = "weekend";
    } else {
      $dow_class = "weekday";
    }
?>

	<td class="<?php echo $dow_class; ?>"></td>

<?php
  } // for

  /*
   * Render the month's calendar.
   */

  for ($dom = 1; $dom <= $daysInMonth; ) {
      for (; ($dow < $lastDayOfWeek) && ($dom <= $daysInMonth); $dow++,$dom++) {
	  
	  
      if (in_array($dow > $daysInWeek ? $dow - $daysInWeek : $dow, array(1, 7))) {
        $dow_class = "weekend";
      } else {
        $dow_class = "weekday";
      }
?>

<td class="<?php echo $dow_class; ?>" onMouseover="td.className='vis1'; me.className='vis1'; mi.className='vis1'" onMouseout="td.className='vis2'; me.className='vis2'; mi.className='vis2'" style="vertical-align:text-top;">
  <div class="date">
    <div id="date_value" style="float:left; visibility:hidden">&nbsp;<img src="<?php echo icon_url('mi.gif') ?>" title="New Milestone" id="mi"/>&nbsp;<img src="<?php echo icon_url('td.gif') ?>" title="New Task" id="td"/>&nbsp;<img src="<?php echo icon_url('me.gif') ?>" title="New Meeting" id="me"/></div>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <?php if ($dom == date('d') && $month == date('m') && $year == date('Y')) {  ?>
	         <span id="date_today" style="font-size:14px; color:#0000FF"><?php echo $dom; ?></span><br />
<?php } else { echo $dom; }  ?><br />
<br />
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top