speedyrudolf
Programmer
Hi. I'm having some trouble showing some tables (originally hidden). I have an input field, and when the user clicks a button another field becomes visible...the user can do this up to 9 times. The problem is that when I click the button, the field stais hidden.
The code is:
function Add_fis_img(i){
document.getElementById('Fis_img').display="";}
<input type="file" id="Fis_img" name="Fis_img" size="100" disabled="true" onchange="Cont_pag3()">      <input type="button" name="Add_img1" value="Adauga fisier" onclick="Add_fis_img(1)"><br/>
<input type="file" id="Fis_img" name="Fis_img" size="100" style="display: none">      <input type="button" name="Add_img2" value="Adauga fisier" onclick="Add_fis_img(2)"><br/>
<input type="file" id="Fis_img" name="Fis_img" size="100" style="display: none">      <input type="button" name="Add_img3" value="Adauga fisier" onclick="Add_fis_img(3)"><br/>
Well...I included just the basics...i don't think anything else has something to do with my problem...and yes, I know that there is another javascript function being called, but it worked (and still works) fine before adding the other input fields, so it's not relevant in this example.
And I tried writing a number at the end of the id and making the function use the field directly (document.form.Fis_img.display=""), tried including the fields in a table (and a few other variations), but that also doesn't work... But submit your ideas anyway...maybe I didn't try it...
Thank you in advance.
The code is:
function Add_fis_img(i){
document.getElementById('Fis_img').display="";}
<input type="file" id="Fis_img" name="Fis_img" size="100" disabled="true" onchange="Cont_pag3()">      <input type="button" name="Add_img1" value="Adauga fisier" onclick="Add_fis_img(1)"><br/>
<input type="file" id="Fis_img" name="Fis_img" size="100" style="display: none">      <input type="button" name="Add_img2" value="Adauga fisier" onclick="Add_fis_img(2)"><br/>
<input type="file" id="Fis_img" name="Fis_img" size="100" style="display: none">      <input type="button" name="Add_img3" value="Adauga fisier" onclick="Add_fis_img(3)"><br/>
Well...I included just the basics...i don't think anything else has something to do with my problem...and yes, I know that there is another javascript function being called, but it worked (and still works) fine before adding the other input fields, so it's not relevant in this example.
And I tried writing a number at the end of the id and making the function use the field directly (document.form.Fis_img.display=""), tried including the fields in a table (and a few other variations), but that also doesn't work... But submit your ideas anyway...maybe I didn't try it...
Thank you in advance.