Hello everyone,

I am trying to duplicate an issue I have with jQuery UI and load helper.

I have the following in a file named test.load (test.load contains a link 
that upon clicking will show a jQuery UI modal -- AKA dialog box)
<script>
$(document).ready(function() {
$('div#thedialog').dialog({ autoOpen: false,
 })
$('#thelink').click(function(){ $('div#thedialog').dialog('open'); });
})
    </script>
</head>
<body>
<div id="thedialog" title="Download complete">
    {{=testForm}}
</div>
<a href="#" id="thelink">Clickme</a>

The test.load file is included in the view file index.html:
{{extend 'layout.html'}}
{{=LOAD('default','test.load',ajax=True)}} </br>

I also have the following in my controller. The controller generates a 
simple form and passes it to the test.load file:

def test():
    testForm  = SQLFORM.factory(
        Field('city'),
        Field('code'),
        )
    
    if testForm.process().accepted:
        response.flash ="form accepted"
    else:
        response.flash ="form not accepted"
    return dict(testForm = testForm)

The view part works fine and the modal display the form. But whenever I 
submit the form, the flash alert "form not accepted" is displayed, meaning 
that something has gone wrong. I don't have any validators on the fields of 
the form generated. So I can't figure out what's going wrong in here. Could 
somebody please help me?

Thanks!

-- 



Reply via email to