Thanks Massimo I will give that a try. Was using firebug last night but wasn't seeing any errors or anything.
--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/cQpjb-On7jY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
# coding: utf8
# try something like
def index():
return dict(message="hello from demo.py")
def edit_loader():
loader = LOAD(f='edit_form', ajax=True)#change to ajax=False and form is shown in dialog
return dict(loader = loader)
def edit_form():
form = SQLFORM.factory(
Field('first_name', 'text'),
Field('last_name', 'text')
)
return dict(form = form){{extend 'layout.html'}}
{{if 'message' in globals():}}
<h3>{{=message}}</h3>
<h4>{{=T('How did you get here?')}}</h4>
<ol>
<li>{{=T('You are successfully running web2py')}</li>
</ol>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
<a class="updateDialog" href="{{=URL(r=request, f='edit_loader')}}">open edit dialog</a>
<div id="edit_dialog" title="Edit record"></div>
<script type="text/javascript">
$(function() {
$("#edit_dialog").dialog({
width: 600,
height: 355,
modal: true,
autoOpen: false
});
//opens the dialog whenever one of the edit icons is clicked
$('a.updateDialog').on('click', function(event) {
event.preventDefault();
//get url to load from the clicked link's href
var url = $(this).attr('href');
//tell jqueryUI to load the url & show it in the dialog
$('#edit_dialog').load(url, function() {
$('#edit_dialog').dialog('open');
});
});
});
</script>
{{=loader}}<h1>This is the default/edit_form.html template</h1>
{{=BEAUTIFY(response._vars)}}<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" type="text/css" media="all" />