On Mon, May 31, 2010 at 12:00 PM, Lance Edgar <[email protected]> wrote:
> On 5/31/2010 1:43 PM, gazza wrote:
>>
>> hello,
>>
>>    ${h.link_to('          View
>>
>> Orders',url(controller='client',action='clientorderlist',id=c.restaurantid),
>> class_="buttonred")}
>>
>>
>> I want to use the history back button? How do you do this pylons?
>>
>>   ${h.link_to('            Products
>> ',onClick="history.go(-1)",class_="buttonred")}
>>
>
> Not sure what the best way is, but the following both work:
>
> ${h.link_to('Products', "javascript:history.go(-1);")}
>
> ${h.link_to('Products', onclick="history.go(-1); return false;")}

I'm not sure which is proper HTML etiquette.  The first is a
"javascript:" URL.  The second sets href="" (the default value).  I've
seen some sites that prefer "#" for the href if there's no target.  Or
you could suppress the href attribute by passing None for the URL.  Is
<a> valid without href?

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to