Hi everyone, i try not to ask here before googling my issues but so far
i haven't found solution for this one:
i have this in my model db.py
db.define_table('person',
Field('first_name'),
Field('last_name'),
Field('address'),
Field('phone'),
Field('email'),
)
in my controller i have:
registration.py
def person():
form = SQLFORM(db.person)
if form.process().accepts:
response.flash="text"
elif form.errors:
response.flash="another text"
else:
response.flash="load your personal information please"
return dict(form=form)
def index():
return dict()
now comes the heavy part, i want to use fancybox to show my
registration/person form in my registration/index i have the following
code:
index.html
1|{{extend 'layout.html'}}
2|{{include 'web2py_ajax.html'}}
3|
4|<script type="text/javascript" src="../static/js/fancybox.js"></script>
5|
6|<link href="../static/css/fancybox.css" rel="stylesheet" type="text/css">
7|<script type="text/javascript">
8| $(document).ready(function(){
9| $('.frame').fancybox({
10| width:'98%',
11| height:'98%',
12| }); //end iframe
13| }); //end ready
14|</script>
15|
16|
17|
18| <ul>
19| <li>{{=A('link',callback=URL('registration','person'),
_class="frame")}}</li>
20| </ul>
and simply it does not work, when i click the link it says "The
requested content cannot be loaded. Please try again later." in the
box, i have tried to link the file in line 4 inside of layout.html and
still doesn't work, after a long time i'm starting to think that it may
be a permission issue since y have tested this possibilities too:
<a class="frame" onclick="ajax('/myapp/registration/person',[],'');return
false" href="#null">New Person</a>
still nothing, and no errors show up in firebug, hints?
--