ok, i've choosen the right piece of software, (the one that seem to trigger 
the submit event), but still the ajax call is missing something. I'm 
pasting the final version:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel='stylesheet' type='text/css' href='/static/style.css'/>
<script>
var lin={% raw line %}
function str_to_obj(o){ 
            document.write('<body><div id="up-bar"></div><div 
id="logo"><img class="logo" src="/static/logo-admantx.png" 
alt="logo"></div><form id="myform" onsubmit="chiam-ajax()" 
action="/myform/" method="post">')
            document.write('<div id="myFormContainer">')
            for(item in o.Form) {
                    document.write(o.Form[item].Description + ' 
<br><hr><br>');
                    for(i in o.Form[item].Response){
                            document.write('<label for="' + 
o.Form[item].Response[i].Name + '">');
                            document.write('<input type="radio" 
name="message' + item +'" value="' + o.Form[item].Response[i].Name + '">' + 
o.Form[item].Response[i].Name + '</label><br>');
                    };
            };
            document.write('<input type="submit" 
value="Submit"></div></form>')
    };
str_to_obj(lin);
</script>
<script type="text/javascript" src="/static/prototype.js"></script>
<script>

function chiam-ajax() {
    var url = '/myform/';
    var pars = document.forms[0].message0.value + '&' + 
document.forms[0].message1.value ;
    var target = 'myAdmantContainer';    
    var myAjax = new Ajax.Updater(target, url, {method: 'post', parameters: 
pars});
};
</script>
</head><div id="myAdmantContainer"></div></body></html>


Where do i write the code to add to 'myAdmantContainer'? I am kind of 
cofused....
Agnese

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to