On Mar 21, 2012, at 2:39 PM, Cliff wrote:
>
> For anyone interested, there are a few more things you have to do.
> If you just add anchor='tabs-2' to URL(), it renders /bla/edit/
> 5#tabs-2.
>
> Not an invalid request, but it doesn't get you to the anchor, either.
Just curious--why not?
>
> So do something like URL(bla, args=[request.args(0), ''],
> anchor='tabs-2').
> That renders bla/edit/5//#tabs-2. Note the two slashes. This works
> but
> only one time, even if you create an observer by using live().
>
> A call to location.reload() fixes that problem.
>
> Here is the complete function. It is kind of slow.
> $('#clickme').live('click', function(){
> alert('hi'); // make sure we are firing on click
> window.location.href = "{{=URL('edit',
> anchor='tabs-2',args=[str(request.args(0))])}}";
> location.reload;
> });