dc651fb6881f319e346ebe4aacc91f1f05580f8f
[jalview.git] / examples / formComplete.html
1 <!--
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18 -->
19
20
21 <div id="view_decorated" name="view_decorated"  style="margin:8px; padding:10px; border: 2px solid red; text-align:center; display:none;"><b>Click <a href="index.html#formComplete"> here</a> to view decorated page</b></div>
22
23
24 <!-- boiler plate link to alternate demopage -->
25 <div style="width: 100%">
26 <div style="width:35%; align:left; float:right;">
27
28 </div>
29 </div>
30
31 <!-- content template start -->
32 <h2><a href="javascript:doSubmit('jalviewLiteJs')">JalviewLite API</a> Demo</h2>
33 <p>Using the Javascript API to fill out forms using data from JalviewLite
34 <br/>Click the Javascript buttons below to interact with the Applet
35 instance on the page.</p>
36 View the source in your browser to see how it has been done. <br/>
37 <a name="api">View the full <a href="javascript:doSubmit('jalviewLiteJs')">JalviewLite API documentation</a>.</a>
38 <applet code="jalview.bin.JalviewLite" width="0" height="0"
39         archive="jalviewApplet.jar,JmolApplet-14.2.14_2015.06.11.jar,java-json.jar,json_simple-1.1.jar" name="Jalview">
40   
41   <param name="file" value="plantfdx.fa"/>
42   <param name="features" value="plantfdx.features"/>
43   <param name="wrap" value="true"/>
44   <param name="showAnnotation" value="false"/>
45   <param name="windowHeight" value="500"/>
46   <param name="windowWidth" value="650"/>
47   <param name="showFullId" value="false"/>
48   <param name="linkLabel_1" value="Uniprot"/>
49   <param name="linkUrl_1"
50          value="http://www.uniprot.org/uniprot/$SEQUENCE_ID$"/>
51   <param name="linkLabel_2" value="Expasy">
52   <param name="linkUrl_2"
53          value="http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID$"/>
54   <param name="hidefeaturegroups" value="uniprot" />
55   <param name="showbutton" value="false" />
56 </applet>
57 <form name="exampleForm"><br/>
58   <br/>
59   <center><strong>Using the Jalview Applet for Input
60       to an HTML Form</strong></center>
61   <div align="center"><input type="button"
62                              onClick="document.forms.exampleForm.exampleTextarea.value=document.applets.Jalview.getAlignment('fasta', 'false')"
63                              value="Fill Form from Jalview" /> <br/>
64     <br/>
65     <textarea name="exampleTextarea" cols="55" rows="9"></textarea></div>
66 </form>
67 <center><strong>Make a new View and Get and Set
68     Group Display List</strong></center>
69 <form name="groupForm">
70   <div align="center"><input type="button"
71                              onClick="document.forms.groupForm.groups.value=document.applets.Jalview.getFeatureGroups()"
72                              value="Get groups" /> <input type="button"
73                                                           onClick="document.applets.Jalview.newView()" value="new View" /> <br/>
74     <textarea name="groups" cols="55" rows="9"></textarea> <br/>
75     <input type="button"
76            onClick="document.applets.Jalview.setFeatureGroupState(document.forms.groupForm.groups.value, true)"
77            value="Display groups" /> <input type="button"
78                                             onClick="document.applets.Jalview.setFeatureGroupState(document.forms.groupForm.groups.value, false)"
79                                             value="Hide groups" /></div>
80 </form>
81 </div>
82 <!-- content template end -->