I need - on click tag A or on ENTER in any input of form - - call an ajax
function
in index.html view:
<form action="javascript: void(0);"
enctype="multipart/form-data" method="post">
<input class="blue-c" name="addr" placeholder="Input
wallet addres"
autofocus="1" id="addr"
style=" width: 100%; padding:5px;
margin-bottom:25px;"
type="text" value="{{=addr}}" /> <br>
{{=A(TAG.i(_class='fa fa-search', _style='width:100px;'),
_id = 'go',
_onclick='ajax("'+URL('where', 'list')+'", ["addr"],
"tag");$(",go-btn").addClass("disabled");$(this).children("i").removeClass("fa-search").addClass("fa-refresh
fa-spin");',
_class='go-btn button ll-blue-bgc center',
)}}
<button class="go-btn hidden"
onclick='ajax("{{=URL('where', 'list')}}", ["addr"],
"tag");$(".go-btn").addClass("disabled");$("#go").children("i").removeClass("fa-search").addClass("fa-refresh
fa-spin");'
type='submit'
/>
</form>
in list.html view:
{{odd = None}}
{{for r in pays_unconf:}}
<div class='row' style='padding-top:5px;padding-bottom:5px;
{{=odd and 'background-color:lavender;' or
''}}' >
......
</div>
{{odd = not odd}}
{{pass}}
example:
https://7pay.in/where
then - if I press ENTER many times it raise error
--
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/d/optout.