Hi folks!
I have some problem with posting the checkboxes with the ioelement.
Here is my code:
function PostData(formName) {
var fn = function(e, success) {
if (!success) alert ('Server Timeout');
}
var elm,f = eval('document.forms.'+formName);
var data = {}
for(var i=0;i<=f.elements.length;i++){
elm = f.elements[i];
if (elm != null) {
if (elm.type == 'text') {
data[elm.name]=elm.value;
alert(elm.name+':'+elm.value+':'+elm.type);
}
else if (elm.type == 'radio') {
if (elm.checked) {
data[elm.name]=elm.value;
alert(elm.name+':'+elm.value+':'+elm.type);
}
}
else if (elm.type == 'checkbox') {
if (elm.checked) {
data[elm.name]=elm.value;
alert(elm.name+':'+elm.value+':'+elm.type);
}
}
}
}
ioelement.post('/admin/login.asp?action=PostAddUser', data, fn);
}
The problem is when i retreve the checkbox and i have multiple selected just the last
one gets posted.
IE:
checkbox 1: name=kalle value:1 checked
checkbox 2: name=kalle value:2 checked
When i fetch kalle by request.form("kalle") i get value:2 and not as regular: value:1,2
Is this a bug or is it something that i need to do myself, if thats the case, how can
i do this, i am not so good at js yet so this is over my head...
I must aswell state that you all that have developed the new release have done a
really really good job!
Best regards
Daniel Tiru
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/