Home

WebWorks Publisher Cookbook code samples

Examples:

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

Understanding the Dynamic HTML template


      
Example 34
.TaskHeading
{	color: #003366; font-size: 13px; 
	font-style: italic; font-weight: bold; 
	margin-top: 0.5em; margin-bottom: 0.5em; }

      
Example 35
<link rel="StyleSheet" href="http://www.scriptorium.com/
my_new_css.css" type="text/css" media="screen">

      
Example 36
<p class="normal_text">

      
Example 37
<span class="$FRAMESTYLENAME;">$DATA;</spa

      
Example 38
.Bold {	 font-weight: bold }
Example 39
<span class="$FRAMESTYLENAME[" ","_"];">$DATA;\
</span>
Example 40
<span class="emphasis_2">$DATA;\
</span>
Example 41
.emphasis_2
{ font-style: italic }

      
Example 42
<script type="text/javascript" 
language="JavaScript">
<!--
if (document.images) {
img1on=new Image();
img1on.src="images/image1on.gif";

img1off=new Image();
img1off.src="images/image1off.gif";
}

function imgOn(imgName) {
if (document.images) {
document[imgName].src=eval(imgName+"on.src");
      }
}
function imgOff(imgName) {
if (document.images) {
document[imgName].src=eval(imgName+"off.src");
      }
}
//-->
</script>

      
Example 43
<a href="$PAGEFIRST(html, name, $CHARSET;);" 
onMouseOver="imgOn('img1')" 
onMouseOut="imgOff('img1')">
Example 44
<img name="img1" src="images/image1off.gif" width="84" height="23" border="0" alt="TOC">

      
Example 45
<a href="$DATA["^message URL ", ""];" onClick="javascript:alert\(\'You are leaving the current document and going to a new web site\. Click the Back button to return\.\'\)\;" target="_top">,

      
Example 46
<script language="javascript">
<!--
function openWin(URL) {
aWindow=window.open(URL,"window","width=600,height=450,
scrollbars=yes,menubar=yes");
}
//-->
</script>

      
Example 47
<a href="javascript:openWin\(\'$DATA["^message URL ", ""];\'\)\;">,

      

      
Example 48
if (window.location.href == parent.location.href)
{
if  (window.location.href.substring(0,4) == "http" ) { document.write('<a href="http://www.website.com"><img src="images/logo.gif" align="left" border="0" alt="Our Website" /></a>');
	}
}
 

      
Example 49
<script type="text/javascript" language="JavaScript">
<!--
if (window.location.href.substring(0,4) == "http")
{
document.write('<frameset rows="100,*">');
document.write('<frame src="site_nav.html" name="site_nav">');
document.write('<frameset cols="33%,*">');
document.write('<frame src="$PAGEFIRST(html, name, $CHARSET;);" name="toc">');
document.write('<frame src="$PAGENEXT(html, name, $CHARSET;);" name="main">');
document.write('</frameset>');
document.write('</frameset>');
}
else
{
document.write('<frameset cols="33%,*">');
document.write('<frame src="$PAGEFIRST(html, name, $CHARSET;);" name="toc">');
document.write('<frame src="$PAGENEXT(html, name, $CHARSET;);" name="main">');
document.write('</frameset>');
}

// -->
</script>

Top of page

Copyright © 2001 Scriptorium Publishing Services.
These code samples correspond to examples provided in The WebWorks Publisher Cookbook. Cookbook owners may use this code for their WebWorks Publisher projects.