JAL-957 standardise formatting for example preamble
[jalview.git] / examples-jbake / templates / jvl_formComplete.ftl
1 <h2><a href="jalviewLiteJs.html">JalviewLite API</a> Demo</h2>
2 <p>Using the Javascript API to fill out forms using data from JalviewLite
3 <br/>Click the Javascript buttons below to interact with the Applet
4 instance on the page.</p>
5 View the source in your browser to see how it has been done. <br/>
6 <a name="api">View the full <a href="jalviewLiteJs.html">JalviewLite API documentation</a>.</a>
7 <applet code="jalview.bin.JalviewLite" width="0" height="0"
8         archive="${content.jvl}" name="Jalview">
9   <#if content.permissions?exists><param name="permissions" value="${content.permissions}"/></#if>
10   <param name="file" value="plantfdx.fa"/>
11   <param name="features" value="plantfdx.features"/>
12   <param name="wrap" value="true"/>
13   <param name="showAnnotation" value="false"/>
14   <param name="windowHeight" value="500"/>
15   <param name="windowWidth" value="650"/>
16   <param name="showFullId" value="false"/>
17   <param name="linkLabel_1" value="Uniprot"/>
18   <param name="linkUrl_1"
19          value="http://www.uniprot.org/uniprot/$SEQUENCE_ID$"/>
20   <param name="linkLabel_2" value="Expasy">
21   <param name="linkUrl_2"
22          value="http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID$"/>
23   <param name="hidefeaturegroups" value="uniprot" />
24   <param name="showbutton" value="false" />
25 </applet>
26 <form name="exampleForm"><br/>
27   <br/>
28   <center><strong>Using the Jalview Applet for Input
29       to an HTML Form</strong></center>
30   <div align="center"><input type="button"
31                              onClick="document.forms.exampleForm.exampleTextarea.value=document.applets.Jalview.getAlignment('fasta', 'false')"
32                              value="Fill Form from Jalview" /> <br/>
33     <br/>
34     <textarea name="exampleTextarea" cols="55" rows="9"></textarea></div>
35 </form>
36 <center><strong>Make a new View and Get and Set
37     Group Display List</strong></center>
38 <form name="groupForm">
39   <div align="center"><input type="button"
40                              onClick="document.forms.groupForm.groups.value=document.applets.Jalview.getFeatureGroups()"
41                              value="Get groups" /> <input type="button"
42                                                           onClick="document.applets.Jalview.newView()" value="new View" /> <br/>
43     <textarea name="groups" cols="55" rows="9"></textarea> <br/>
44     <input type="button"
45            onClick="document.applets.Jalview.setFeatureGroupState(document.forms.groupForm.groups.value, true)"
46            value="Display groups" /> <input type="button"
47                                             onClick="document.applets.Jalview.setFeatureGroupState(document.forms.groupForm.groups.value, false)"
48                                             value="Hide groups" /></div>
49 </form>
50 </div>