On Mar 21, 2012, at 3:14 PM, Cliff wrote:
> Dunno.  But it acts this way even if I type the url in the browser
> destination box by hand.
> 
> Firefox 11.0 on Ubu Natty.  Haven't tried it yet with Chromium or
> Opera.

Odd. The RFC example has no slash. But that'd be a very strange bug for Firefox.

> 
> I'll confess to being ignorant about what the RFCs say about url
> formation.
> 
> On Mar 21, 5:54 pm, Jonathan Lundell <[email protected]> wrote:
>> 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;
>>>        });


Reply via email to