On Tuesday, September 30, 2014 12:02:32 AM UTC-7, Niphlod wrote:
>
> nope, just an A. if ou need a something that when you click on it it 
> brings you on another page, A is the thin you're searching for, not a 
> button.
>

Would he perhaps be looking for a link styled as a button?  Appadmin does 
that just by setting the link's style to "btn", a technique that works for 
me in one of my apps.


<a class="btn" href="/LogServer/appadmin/insert/db/updatechecks"></a>

(the non-Appadmin example points to a separate server)

/dps



 

>
> On Monday, September 29, 2014 10:59:46 PM UTC+2, Bernhard Radermacher 
> wrote:
>>
>> Would that be just enclosing the button with <a>? 
>>
>> On Monday, September 29, 2014 6:35:15 AM UTC-7, Niphlod wrote:
>>>
>>> we did a pretty heavy job to discard any inline javascript .... this 
>>> goes exactly in the opposite way. What are you seeking in functionality ? 
>>> It seems that your *button *is better suited with a normal *a*
>>>
>>>
>>> On Sunday, September 28, 2014 10:37:33 PM UTC+2, Bernhard Radermacher 
>>> wrote:
>>>>
>>>> I was always a bit disappointed with the features, or rather 
>>>> non-features of the html button, basically that all functionality has to 
>>>> be 
>>>> programmed by hand. 
>>>>
>>>> I created a small class (and patched it into gluon.html) to make a 
>>>> button and the respective JQuery script automatically. At this time the 
>>>> button just works as a link to a page.
>>>>
>>>> Would like to discuss if something like this makes sense, if it would 
>>>> make more sense to add to the standard by expanding gloun.html.BUTTON to 
>>>> accept 'href' and behave accordingly...
>>>>
>>>>
>>>>
>>>> class linkBUTTON(DIV):
>>>>     """
>>>>     Pseudo Component to automatically generate JavaScript to execute on 
>>>> click
>>>>     """
>>>>     
>>>>     tag = 'linkbutton'
>>>>
>>>>     def xml(self):
>>>>         """
>>>>         get attributes to generate the BUTTON, override _type to 
>>>> 'button'
>>>>         if href is defined, create the respective JavaScript
>>>>         """
>>>>         href = None
>>>>         attr = {}
>>>>         for key, value in self.attributes.iteritems():
>>>>             if key == 'href':
>>>>                 href = value
>>>>                 continue
>>>>             if key[:1] != '_':
>>>>                 continue
>>>>             attr[key] = value
>>>>
>>>>         attr['_id'] = uuid4()
>>>>         attr['_type'] = 'button'
>>>>         
>>>>         result = BUTTON(self.components, **attr).xml()
>>>>         if href:
>>>>             result += '\n' + 
>>>> SCRIPT("$('#%s').click(function(){window.location.assign('%s');});" % 
>>>> (attr['_id'], href)).xml()
>>>>
>>>>         return result
>>>>
>>>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to