From 610aaaf543fbc06ed3173011750b48001dc5003c Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 11 Dec 2012 12:22:52 +0100 Subject: working version with proxy --- views/layout.haml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'views/layout.haml') diff --git a/views/layout.haml b/views/layout.haml index 40c6747..1abb7a8 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -3,6 +3,26 @@ %head %script{:type => "text/javascript", :src => "jquery-1.8.2.js"} :javascript + function show(title,element,uri) { + $(element).html("

"+title+"

"+"\"Searching"); + $.ajax({ + cache: true, + url: uri, + success: function(data){ + data = "

"+title+"

"+"" + data; + $(element).html(data); + }, + error: function(data,textStatus,message){ + $(element).html(message); + } + }); + } + + function hide(title,element,uri) { + data = "

"+title+"

"+""; + $(element).html(data); + } + function display(element,uri) { $(element).html("\"Searching"); $.ajax({ @@ -18,7 +38,7 @@ } %body - %h1 adverse outcome pathways + %h1 AOP read across %form{:name => "form", :action => '/search', :method => "GET"} %fieldset %label{:for => 'name'} Compound name: -- cgit v1.2.3