File: MobLinkExample.html

package info (click to toggle)
mobyle 1.0.6~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,036 kB
  • sloc: python: 19,496; sh: 54; makefile: 30; xml: 6; ansic: 5
file content (61 lines) | stat: -rw-r--r-- 2,538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<title>MobLink Example</title>
<meta name="author" content="Hervé Ménager">
<style type="text/css">
body{
  font-family: Verdana,Arial,Helvetica,sans-serif;
}
h1, h2{
  color: #4682B4;
}
</style>
</head>
<body>
<h1>MobLink functionnality demo</h1>

<p><tt>MobLinks</tt> are a way to link a website to a Mobyle website using a HTML anchor or an HTML form. 
  To do this you need to provide parameters that specify the value of each parameter for each form you want to prefill.
  For instance, if you want to link to a preloaded golden form that specifies the bank and the identifier, you will
  provide the corresponding parameters in the link or form:</p>
<ul>
  <li><tt>load::golden::db</tt>=<tt>uniprot</tt></li>
  <li><tt>load::golden::query</tt>=<tt>104K_THEPA</tt></li>
</ul>
<p>Each of the parameter names is composed of three parts:</p> 
<ul>
  <li><tt>load</tt> which tells mobyle that it should load the following value into a form</li>
  <li><tt>[form name]</tt> which is the name of the form where the value is to be loaded</li>
  <li><tt>[parameter name]</tt> which is the name of the parameter where the value is to be loaded</li>
</ul>
<p>The url which should be loaded (in the form's <tt>action</tt> attribute or in the anchor's <tt>href</tt> attribute) 
is the url of the mobyle portal where you want to load the forms (e.g. http://mobyle.pasteur.fr).</p>
<p>Please refer to the sourcecode of this page for more details.</p>

<h2>Form example</h2>

<p>Forms require a little more HTML code than anchors, but should be easier to generate, and do not force you to use <tt>GET</tt> requests
which generate long URLs.</p>

<form action="http://rita.sis.pasteur.fr:85/cgi-bin/portal.py" method="post" enctype="multipart/form-data" target="_blank">
<div>
<label>Here is the db that has to be set in golden prefilled form
<input name="load::golden::db" value="uniprot"></label>
</div>
<div>
<label>Here is the db that has to be set in golden prefilled form
<input name="load::golden::query" value="104K_THEPA"></label>
</div>
<input type="submit" name="Open" value="open"></div>
</form>

<h2>Anchor example</h2>

<p>Anchors are more concise but are limited to <tt>GET</tt> requests, and the URLs can be harder to generate, because you need to concatenate the
target URL and the encoded parameter values.</p>

<a href="http://rita.sis.pasteur.fr:85/cgi-bin/portal.py?load::golden::db=uniprot&load::golden::query=104K_THEPA" target="_blank">Open the <b>golden</b> form in Mobyle</a>

</body>
</html>