> On 21/01/13 15:26, Paul Boddie wrote:
>> On 21/01/13 15:16, Jeremy Goecks wrote:
>>> Adding the attribute
>>> 
>>> target="_top"
>>> 
>>> to your URL will load the URL in the main browser window rather than a 
>>> frame. E.g.
>>> 
>>> <a href="controller/action" target="_top">Load result in top window</a>
>> 
>> But in the Python code itself? I'm writing an action in the user controller 
>> that should redirect to the main page after interacting with the user in the 
>> centre frame, and although I can see some JavaScript magic in various 
>> template files, along with a refresh_frames parameter, I can't get either 
>> trans.response.send_redirect or trans.fill_template to produce something 
>> that breaks out of the frameset and refreshes the entire browser window.
> 
> Following up to myself with one solution that seemed to work: I defined a 
> template that inherits from "base.mako" and which writes a message for 
> browsers without JavaScript enabled, telling the user to follow a link to the 
> main page in the way suggested above. But in the page's JavaScript I put the 
> following:
> 
> window.top.location.href = '${h.url_for( "/" )}';

Sure, this will accomplish what you want from the server side. You could 
generalize this approach with an option that resembles refresh_frames if you 
wanted.

> It feels like a nasty hack, but I suppose that any application using frames 
> is more or less obliged to deploy JavaScript "redirects" of this nature for 
> such operations.

We're slowly transitioning Galaxy to be a single-page, HTML5/JavaScript driven 
Web application so that we can provide more flexibility and power in the UI 
like what you're after here.

Best,
J.



___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to