• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Array form Explorer doesn´t work

 
Ranch Hand
Posts: 111
Eclipse IDE Firefox Browser Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

Why this code doesn´t work in explorer, and in firefox it does?

<code>

for (i=0; i < indice -1 ; i++){
alert(document.form.DANOS[i].value);
if (document.form.DANOS[i].value == ''){
alert('Debe indicar todos');
return;
}
}

</code>

the code breaks in this part of the code not showing de DANOS[i].value

the DANOS field has be created his way

<code>

var input_1 = document.createElement("input");
input_1.setAttribute("type" , "text");
input_1.setAttribute("size" , "20");
//input_1.setAttribute("value" , "");
input_1.setAttribute("name", "DANOS");
cell_1.appendChild(input_1);
cell_1.style.cssText = "color:#4c80b0; font-family:Verdana,Helvetica,sans-serif; font-size:8.0pt; font-weight:normal; text-align:center;";
row.appendChild(cell_1);
document.getElementById("tabla_insertar").appendChild(row);


</code>

Thanks.


 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IE does not set the name attribute.

I have an example here which solves the problem.

Eric

 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic