Help - Search - Members - Calendar
Full Version: remote control calender
Movable Type Community Forum > Additional Resources > Tips and Tricks
holiday
Anyone here know javascript? Anyone want to help?

I'm trying to put together a pop up remote calender that will open archive entries on the main page.

I'm doing this up in Dreamweaver.

Here's a start:

CODE

<script>
<!--
function remote()
{
win2=window.open("remote.htm","","width=200,height=200,scrollbars")
win2.creator=self
}
//-->
</script>
<form>
<input type="button" value="Launch Calender!" onClick="remote()">
</form>


to open the pop up calender.
and...

CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>calender pop-up</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Remote Control</title>
<script>
<!--
function remote2(url){
creator.location=url
}
//-->
</script>
<style type="text/css">
<!--
    body {
 margin:0px 0px 20px 0px;
 background:#FFF;  
 }
    A    { color: #003366; text-decoration: underline; }
    A:link  { color: #003366; text-decoration: underline; }
    A:visited    { color: #003366; text-decoration: underline; }
    A:active    { color: #999999;  }
    A:hover  { color: #999999;  }

    h1, h2, h3 {
 margin: 0px;
 padding: 0px;
    }

    #banner {
 font-family:palatino,  georgia, verdana, arial, sans-serif;
 color:#333;
 font-size:x-large;
 font-weight:normal;    
   padding:15px;
               border-top:4px double #666;
 }

    #banner a,
       #banner a:link,
       #banner a:visited,
       #banner a:active,
       #banner a:hover {
 font-family: palatino,  georgia, verdana, arial, sans-serif;
 font-size: xx-large;
 color: #333;
 text-decoration: none;
 }


.calendar {
 font-family:verdana, arial, sans-serif;
 color:#666;
 font-size:x-small;
 font-weight:normal;
   background:#FFF;
   line-height:140%;
   padding:2px;
               text-align:left;
 }
    
    .calendarhead {    
 font-family:palatino, georgia, times new roman, serif;
 color:#666600;
 font-size:small;
 font-weight:normal;
   padding:2px;
 letter-spacing: .3em;
   background:#FFF;
   text-transform:uppercase;
 text-align:left;  
 }
 
-->
</style>  
</head>

<body bgcolor="ffffff">
<div align="left">

<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFF00">
 <tr>
   <td width="100%"><p align="center"><strong><big><font face="Arial">Remote Control</font></big></strong></td>
 </tr>
</table>
</div>



<div align="center" class="calendar">
<table border="0" cellspacing="4" cellpadding="0" summary="Monthly calendar with links to each day's posts">
<caption class="calendarhead"><$MTDate format="%B %Y"$></caption>
<tr>
<th abbr="Sunday" align="center"><span class="calendar">Sun</span></th>
<th abbr="Monday" align="center"><span class="calendar">Mon</span></th>
<th abbr="Tuesday" align="center"><span class="calendar">Tue</span></th>
<th abbr="Wednesday" align="center"><span class="calendar">Wed</span></th>
<th abbr="Thursday" align="center"><span class="calendar">Thu</span></th>
<th abbr="Friday" align="center"><span class="calendar">Fri</span></th>
<th abbr="Saturday" align="center"><span class="calendar">Sat</span></th>
</tr>

<MTCalendar>
<MTCalendarWeekHeader><tr></MTCalendarWeekHeader>

<td align="center"><span class="calendar">
<MTCalendarIfEntries>
<MTEntries lastn="1"><a href="javascript:remote2('../javaindex.htm')
<$MTEntryPermalink$>"><$MTCalendarDay$></a>
</MTEntries></MTCalendarIfEntries>
<MTCalendarIfNoEntries><$MTCalendarDay$>
</MTCalendarIfNoEntries><MTCalendarIfBlank> </MTCalendarIfBlank></span></td>
<MTCalendarWeekFooter></tr></MTCalendarWeekFooter>
</MTCalendar>
</table>

</div>


</body>
</html>


for the actual calender pop up.

It's sloppy right now. I'm probably doing it all wrong.
Any ideas?
holiday
sad.gif I guess 1st of all I should figure out how to switch off html for these posts! tongue.gif

uhhh...let me see here...
kadyellebee
fixed the post, and added some line breaks to keep the page from getting too wide! smile.gif
holiday
Thanks! It was getting outta control.

So I don't know if this'll work:

a href="java script:remote2('../javaindex.htm')
<$MTEntryPermalink$>"><$MTCalendarDay$>
It would be too simple.

Anyhow, it was inspired by the "My Assistant" on this website. I suppose I need to add a "switch month/year" in the pop up as well.

Hmmm..I think I might be missing code in the example...

BTW, ignore some of that style stuff. I just did aquick paste job.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.