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