im trying to change an input type hidden to input type file. The code is working fine on mozilla firefox and internet explorer, but it is not working on Google chrome. Following is my code. Plz help..!!

<script type="text/javascript">
function hide()
{
$(document).ready(function()
{
$('#att').hide();
$('#change').hide();
$('#change1').hide();
document.getElementById('fileatt').type='file';

})
}
</script>

<input name="fileatt" id="fileatt" type="hidden" size="12" style="float:left;">
<input type="button" id="change" value="Change" onclick="hide()">

    Why not use .hide() (and .show()) the way you do for all the other fields?

      thnks for the reply..
      I tried using .show() , but the function does not help showing the input type file on any browser. The reason i think is that the input type remains hidden and hence, does not show up.. 🙁

        Weedpacket;11000758 wrote:

        Why not use .hide() (and .show()) the way you do for all the other fields?

        Thnk u Weedpacket..
        Your Idea was quite helpful..
        I used input type 'file' instead of 'hidden' for id 'fileatt'; on window load, i used jquery to hide it using .hide() function and onclick i used .show() function to show the field. Thnk u once again..!!

          Write a Reply...