That's perfect!
I used a hidden form value to select a Day table.
I also used a mouseover effect.
I'm posting my code:
weekplan.htm
Code:
<style type="text/css">
<!--
/* week plan */
.WeekPlanCol
{ width:200px; height:1px; }
.WPDates { font-size: 9px; color:#FF6600;}
.WPText{ font-size: 10px; color:#000000;}
.WPTitles { font-size: 10px; color:#ffffff; background-color:#0066CC; font-weight:bold;}
.WPTable1 { border-style:inset; border-width:2px;}
.WPTable2 { border-style:outset; border-width:2px; border-color:#FF0000; }
.WPTable3 { border-style:dashed; border-width:2px; border-color:#FFCC00; }
.style1 {font-weight: bold}
-->
</style>
<table width="100%" border="0" cellspacing="6" cellpadding="0">
<tr>
<!--- first column --->
<td valign="top">
<table width="100%%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" class="WPTable1" onmouseover="this.className='WPTable2'" onmouseout="this.className='WPTable1'" onClick="this.className='WPTable3'; document.Form_WP.SelDay.value=1">
<tr align="left">
<td colspan="4" class="WPTitles">Monday</td>
</tr>
<tr>
<td nowrap class="WPDates">21:00#</td>
<td width="100%" class="WPText">aaaaaaaaaaaaaaaa</td>
<td width="17"><a href=""><img src="images/adm_edit_small.gif" alt="Edit" width="11" height="10" border="0"></a></td>
<td width="17"><a href=""><img src="images/adm_del_small.gif" alt="Delete" width="11" height="10" border="0"></a></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" class="WPTable1" onmouseover="this.className='WPTable2'" onmouseout="this.className='WPTable1'" onClick="this.className='WPTable3'; document.Form_WP.SelDay.value=2">
<tr align="left">
<td colspan="4" class="WPTitles">Day2</td>
</tr>
<tr>
<td nowrap class="WPDates">21:00#</td>
<td width="100%" class="WPText">aaaaaaaaaaaaaaaa</td>
<td width="17"><a href=""><img src="images/adm_edit_small.gif" alt="Edit" width="11" height="10" border="0"></a></td>
<td width="17"><a href=""><img src="images/adm_del_small.gif" alt="Delete" width="11" height="10" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" class="WPTable1" onmouseover="this.className='WPTable2'" onmouseout="this.className='WPTable1'" onClick="this.className='WPTable3'; document.Form_WP.SelDay.value=3">
<tr align="left">
<td colspan="4" class="WPTitles">Day 3</td>
</tr>
<tr>
<td nowrap class="WPDates">21:00#</td>
<td width="100%" class="WPText">aaaaaaaaaaaaaaaa</td>
<td width="17"><a href=""><img src="images/adm_edit_small.gif" alt="Edit" width="11" height="10" border="0"></a></td>
<td width="17"><a href=""><img src="images/adm_del_small.gif" alt="Delete" width="11" height="10" border="0"></a></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" class="WPTable1" onmouseover="this.className='WPTable2'" onmouseout="this.className='WPTable1'" onClick="this.className='WPTable3'; document.Form_WP.SelDay.value=4">
<tr align="left">
<td colspan="4" class="WPTitles">Day 4</td>
</tr>
<tr>
<td nowrap class="WPDates">21:00#</td>
<td width="100%" class="WPText">aaaaaaaaaaaaaaaa</td>
<td width="17"><a href=""><img src="images/adm_edit_small.gif" alt="Edit" width="11" height="10" border="0"></a></td>
<td width="17"><a href=""><img src="images/adm_del_small.gif" alt="Delete" width="11" height="10" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" class="WPTable1" onmouseover="this.className='WPTable2'" onmouseout="this.className='WPTable1'" onClick="this.className='WPTable3'; document.Form_WP.SelDay.value=5">
<tr align="left">
<td colspan="4" class="WPTitles">Day 5</td>
</tr>
<tr>
<td nowrap class="WPDates">21:00#</td>
<td width="100%" class="WPText">aaaaaaaaaaaaaaaa</td>
<td width="17"><a href=""><img src="images/adm_edit_small.gif" alt="Edit" width="11" height="10" border="0"></a></td>
<td width="17"><a href=""><img src="images/adm_del_small.gif" alt="Delete" width="11" height="10" border="0"></a></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" class="WPTable1" onmouseover="this.className='WPTable2'" onmouseout="this.className='WPTable1'" onClick="this.className='WPTable3'; document.Form_WP.SelDay.value=6">
<tr align="left">
<td colspan="4" class="WPTitles">Day 6</td>
</tr>
<tr>
<td nowrap class="WPDates">21:00#</td>
<td width="100%" class="WPText">aaaaaaaaaaaaaaaa</td>
<td width="17"><a href=""><img src="images/adm_edit_small.gif" alt="Edit" width="11" height="10" border="0"></a></td>
<td width="17"><a href=""><img src="images/adm_del_small.gif" alt="Delete" width="11" height="10" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" class="WPTable1" onmouseover="this.className='WPTable2'" onmouseout="this.className='WPTable1'" onClick="this.className='WPTable3'; document.Form_WP.SelDay.value=7">
<tr align="left">
<td colspan="4" class="WPTitles">Day 7</td>
</tr>
<tr>
<td nowrap class="WPDates">21:00#</td>
<td width="100%" class="WPText">aaaaaaaaaaaaaaaa</td>
<td width="17"><a href=""><img src="images/adm_edit_small.gif" alt="Edit" width="11" height="10" border="0"></a></td>
<td width="17"><a href=""><img src="images/adm_del_small.gif" alt="Delete" width="11" height="10" border="0"></a></td>
</tr>
</table></td>
<td> </td>
</tr>
</table>
</td>
<!--- second column --->
<td class="WeekPlanCol"><img src="images/spacer.gif" class="WeekPlanCol"><br>
<iframe src="programs.htm" width="200" height="300" frameborder="0" marginheight="0" marginwidth="0" name="prgiframe" scrolling="auto"></iframe>
</td>
</tr>
</table>
<a href="javascript:alert(document.Form_WP.SelDay.value);">111111</a>
<form name="Form_WP">
<input type="hidden" name="SelDay" value="">
</form>
<cfinclude template="footer.cfm">
and
programs.htm (the iframe page)
Code:
<table width="198" border=0 cellspacing=1 cellpadding=0 align="center">
<tr>
<td style="font-size:10px;">p050</td>
<td style="font-size:10px;"><a href="Javascript:alert('this is what i want to add to the selected day, but not only the text i also need it\'s value')">Text 1</a></td>
</tr>
<tr>
<td style="font-size:10px;">p100</td>
<td style="font-size:10px;"><a href="this.htm?valueineed=1">Text 2</a></td>
</tr>
<tr>
<td style="font-size:10px;">p150</td>
<td style="font-size:10px;"><a href="">Text 3</a></td>
</tr>
<tr>
<td style="font-size:10px;">p140</td>
<td style="font-size:10px;"><a href="">Text 4</a></td>
</tr>
</table>
--------------
Now one more question, is it possible when some clicks the iframe text link to pass / add to the selected table it's text & it's value ?
These text links in the iframe are read from the database and represend some TV programs.
All of them has a default start time and a duration.
So my links are something like this:
<a href="weekplan.htm?programstarttime=17:30&prgduration=90">Sex and the city</a>
1) How can i add for example the text of the Sex and the city to a form input with hidden values it's start time and it's duration, and
2) how can i automatically SORT by start time the list for each day?
In the above example if someone has already selected Monday and has added Sex and the City first row in the Monday like this:
17:30 | Sex and the City
and he/she then clicks <a href="weekplan.htm?programstarttime=14:00&prgduration=120">The fun</a>
we must get:
14:00 | The fun
17:30 | Sex and the City
etc...
Can you also help in this??
Thank a lot for your great help!