Source code for Browser support optimizing files
Start by creating popup.xsl. Title should be "Popup template".
When creating the xml-files, choose "Common Template" for all files except
messForm.xml, that should have the "Popup template".
Place all files in the R&D folder.
index.xml
<!-- New code -->
<head>
<script language="JavaScript">
<!--
messageWindow = '';
function openMessWin(url)
{
messageWindow =
window.open(url,'messWin','toolbar=no,status=no,height=570,width=388');
if(!messageWindow.opener)
messageWindow.opener = self;
}
//-->
</script>
</head>
<!-- New code ends -->
<h1>Robotics Evaluation</h1>
<p initial="initial">The R&D team is for the moment training some robots.
The team also recommends you to check out another poject in the graphics Labs,
and some samples from using Roxen Web technology</p>
<p />
<img src="robodog.psd" width="240" height="205" alt="Robodog" border="0"
align="left" />
<br clear="all"><font size="-1"><b>Snapshot from the Labs.</b></font></br>
<!-- New code -->
<p />
<p />
<h1>Contact R&D</h1>
<p initial="initial">If you have any suggestions, complaints or other messages
to the R&D
staff, please don't hesitate to
<if supports="javascript">
<!-- javascript pop-up form -->
contact us.
<form>
<input type="button" value="CONTACT R&D"
onClick='openMessWin("messForm.xml")' />
</form>
<form name="hiddenForm" action="disp_mess.xml">
<input type="hidden" name="_name" />
<input type="hidden" name="mail" />
<input type="hidden" name="mess" />
</form>
<noscript>
<p>
<b>This page uses JavaScript, so you should enable JavaScript in your
browser options and reload this page for the button above to work.
Else, <a href="message.xml">click here</a>
to contact R&D staff.</b>
</p>
</noscript>
</if>
<else>
<!-- new page html form -->
<a href="message.xml"><b>contact us</b></a>.
</else>
</p>
<!-- New code ends -->
disp_mess.xml Up
<h1>Message sent</h1>
<p>Following message sent to R&D:</p>
<table border="0">
<tr>
<td><b>From:</b></td><td>&form._name;</td>
</tr>
<tr>
<td><b>Mail:</b></td><td>&form.mail;</td>
</tr>
</table>
<p><b>Message:</b></p>
<p>&form.mess;</p>
<a href="index.xml"><b>BACK TO R&D</b></a>
messForm.xml Up
<script language="JavaScript">
<!--
function checkData ()
{
if (document.messForm._NAME.value.length > 0)
{
window.opener.document.hiddenForm._name.value =
document.messForm._NAME.value;
window.opener.document.hiddenForm.mail.value =
document.messForm.MAIL.value;
window.opener.document.hiddenForm.mess.value =
document.messForm.MESS.value;
window.opener.document.hiddenForm.submit();
window.close();
return false;
}
else
{
alert("You must enter a name!");
return true;
}
}
function pushed(action)
{
if(action == "submit")
checkData();
else if(action == "clear")
document.messForm.MESS.value="";
else
window.close();
}
//-->
</script>
<p>Please fill in this form and click 'Send'
to send a message to the R&D staff.</p>
<form name="messForm" onSubmit="return checkData()">
<table border="0">
<tr>
<td><b>Name:</b></td><td><input type="text" name="_NAME" size="25"/></td>
</tr>
<tr>
<td><b>Mail:</b></td><td><input type="text" name="MAIL" size="25"/></td>
</tr>
</table>
<textarea name="MESS" rows="15" cols="50">
Write your message here...
</textarea>
<p></p>
<input type="button" value="SEND" onClick='pushed("submit")'/>
<input type="button" value="Cancel" onClick='pushed("close")'/>
<input type="button" value="Clear" onClick='pushed("clear")'/>
</form>
message.xml Up
<h1>Contact R&D</h1>
<p>Please fill in this form and click 'Send'
to send a message to the R&D staff.
</p>
<form name="messForm" action="disp_mess.xml" method="post">
<table border="0">
<tr>
<td><b>Name:</b></td><td><input type="text" name="_name" size="25" /></td>
</tr>
<tr>
<td><b>Mail:</b></td><td><input type="text" name="mail" size="25" /></td>
</tr>
</table>
<textarea name="mess" rows="10" cols="50">
Write your message here...
</textarea>
<br/>
<input type="submit" value="SEND" />
</form>
popup.xsl Up
<?xml version='1.0'?>
<xsl:stylesheet rxml:copy-unknown-elements="yes">
<xsl:import href="/templates/buttons.xsl" />
<xsl:import href="/templates/containers.xsl" />
<xsl:import href="/templates/color-palette1.xsl" />
<xsl:output method="html" />
<xsl:param name="company-logo" rxml:type="string" select="'DemoLabs'" />
<xsl:param name="company-full" rxml:type="string" select="'DemoLabs, Inc.'" />
<xsl:param name="logo-font" rxml:type="font" select="'quadrangle'" />
<xsl:param name="logo-font-size" rxml:type="int" select="'36'" />
<xsl:param name="h1-font" rxml:type="font" select="'yikes!'" />
<xsl:param name="h1-font-size" rxml:type="int" select="'36'" />
<xsl:param name="h2-fonts" rxml:type="string"
select="'arial, helvetica, sans-serif'" />
<xsl:param name="table-border" rxml:type="int" select="0" />
<xsl:template match="/">
<html>
<head>
<meta name="keywords" content="&page.keywords;"/>
<meta name="description" content="&page.description;"/>
<title>&page.title;</title>
</head>
<body bgcolor="{$bgcolor-primary}" link="{$fgaccent-secondary}"
vlink="{$fgaccent-secondary}" text="{$fgcolor-primary}"
alink="{$fgaccent-primary}" topmargin="0" bottommargin="0"
marginwidth="0" marginheight="0" leftmargin="0"
rightmargin="0">
<center>
<!-- DemoLabs logo -->
<table width="100%" cellpadding="0" cellspacing="0" border="{$table-border}">
<tr>
<td width="100%" valign="top" align="left" bgcolor="{$bgcolor-secondary}">
<gtext font="{$logo-font}" fgcolor="{$fgaccent-secondary}"
bgcolor="{$bgcolor-secondary}" bshadow="1"
fontsize="{$logo-font-size}" xspacing="10"
yspacing="2" scolor="#333333" outline="{$bgaccent-secondary},2"
border="0" align="left" valign="top" border="0"
xsize="400" format="gif" quant="128" move="10,5"
vspace="5"><xsl:value-of select="$company-logo" />
</gtext>
</td>
</tr>
</table>
<!-- Black line -->
<table width="100%" cellpadding="0" cellspacing="0" border="{$table-border}">
<tr>
<td colspan="2" bgcolor="{$bgaccent-secondary}" width="100%">
<img src="internal-roxen-unit" width="400" height="10" alt=""
border="0"/>
</td>
</tr>
<!-- Space before content -->
<tr>
<td colspan="2" bgcolor="{$bgcolor-primary}" width="100%">
<img src="internal-roxen-unit" width="400" height="10" alt=""
border="0"/>
</td>
</tr>
</table>
<!-- Page contents -->
<table width="100%" cellpadding="0" cellspacing="0" border="{$table-border}">
<tr>
<td bgcolor="{$bgcolor-primary}">
<img src="internal-roxen-unit" width="10" height="2" alt=""
border="0"/>
</td>
<!-- Contents -->
<td allign="left" valign="top">
<font face="{$h2-fonts}">
<xsl:apply-templates />
<br />
</font>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="{$table-border}">
<!-- Black line -->
<tr>
<td colspan="2" bgcolor="{$bgaccent-primary}" width="100%">
<img src="internal-roxen-unit" width="400" height="10" alt=""
border="0"/>
</td>
</tr>
<!-- Copyright -->
<tr>
<td bgcolor="{$bgcolor-secondary}">
<img src="internal-roxen-unit" width="10" height="2" alt=""
border="0"/>
</td>
<td bgcolor="{$bgcolor-secondary}">
<font color="{$fgcolor-secondary}" face="{$h2-fonts}" size="-1">
Copyright © <date part="year" />
<xsl:value-of select="$company-full" />, All rights reserved.
<br />
</font>
</td>
</tr>
</table>
</center>
</body>
</html>
</xsl:template>
</xsl:stylesheet>