hello all,
i have a form with 6 elemnt:
[CODE=html]<label><input type="radio" name="name_b" value="120x60" checked="checke d"/>120x60</label><!-- #1 -->
<input type="radio" name="name_b" value="468x60" />468x60</label><!--#2-->
<input type="text" size="6" id="wx" name="wx" value="200" checked="checke d"/><!--#3 notice the checked="checke d" i add -->
<input type="text" size="6" id="wy" name="wy" value="200" checked="checke d"/><!--#4 -->
<input type="text" size="40" id="path" name="path" value="i need this value" checked="checke d" /><!--#5-->
<input type="submit" value="go" /><!--#6-->[/CODE]
what i want to do (and manage to do it with FF but not with IE) is to get the elements that are sepose to b send to the server, here is the function i use
[CODE=javascript] x=document.form s['myform_name'];
f="elements i need from my form\n";
for(i=0; i<(x.elements.l ength-1); i++){//-1 cuz i dont need the submit button
if(x.elements[i].checked){//thats y i add the checked to the elements
f+=x.elements[i].value;
f+="\n";
}
alert(f);
}[/CODE]
is there a short way for IE as well ?
i have a form with 6 elemnt:
[CODE=html]<label><input type="radio" name="name_b" value="120x60" checked="checke d"/>120x60</label><!-- #1 -->
<input type="radio" name="name_b" value="468x60" />468x60</label><!--#2-->
<input type="text" size="6" id="wx" name="wx" value="200" checked="checke d"/><!--#3 notice the checked="checke d" i add -->
<input type="text" size="6" id="wy" name="wy" value="200" checked="checke d"/><!--#4 -->
<input type="text" size="40" id="path" name="path" value="i need this value" checked="checke d" /><!--#5-->
<input type="submit" value="go" /><!--#6-->[/CODE]
what i want to do (and manage to do it with FF but not with IE) is to get the elements that are sepose to b send to the server, here is the function i use
[CODE=javascript] x=document.form s['myform_name'];
f="elements i need from my form\n";
for(i=0; i<(x.elements.l ength-1); i++){//-1 cuz i dont need the submit button
if(x.elements[i].checked){//thats y i add the checked to the elements
f+=x.elements[i].value;
f+="\n";
}
alert(f);
}[/CODE]
is there a short way for IE as well ?
Comment