It shouldn't be causing any problems, so you don't really *have* to remove
it. Unfortunately, it is inserted by the .xml() method, so you can't just
manipulate the A() object. Instead, you can do:
{{=XML(A(...).xml().replace(' data-w2p_disable_with="default"', ''))}}
I suppose you could make a class that does that:
class A2(A):
def xml(self):
return super(A2, self).xml().replace('
data-w2p_disable_with="default"', '')
Anyway, we should probably change the behavior of A() so it doesn't add
that attribute when not needed.
Anthony
On Monday, January 20, 2014 2:22:17 PM UTC-5, User wrote:
>
> Anyone know how to remove it? I'm about to switch to using raw html
> instead of A helper but if someone knows a way to remove the
> "data-w2p_disable_with"
> attribute I'd rather do that. If there is not an official way perhaps
> there is a hack where I could redefine the A helper somehow
>
>
>
> On Saturday, January 4, 2014 1:25:43 AM UTC-5, User wrote:
>
>> Good to know. How can I remove it for all my links?
>>
>> On Monday, December 30, 2013 8:18:11 PM UTC-5, Anthony wrote:
>>>
>>> That's so the link can be temporarily disabled (the text will be
>>> replaced with "Working...") when it is used to trigger an Ajax request.
>>> However, I don't know why it's included in the anchor tag in all cases --
>>> seems like it would only be needed when the "cid", "component", or
>>> "callback" arguments are used.
>>>
>>> Anthony
>>>
>>> On Monday, December 30, 2013 5:39:53 PM UTC-5, User wrote:
>>>>
>>>> Links I build with the anchor A html helper look like:
>>>>
>>>> <a href="/myapp/mycontroller/view/5"
>>>> data-w2p_disable_with="default">Anchor
>>>> Text</a>
>>>>
>>>> What is the purpose of the data-w2p_disable_with = "default" attribute
>>>> and how can I remove it?
>>>>
>>>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.