Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery MultiFile choose file button

I use jQuery MultiFile plugin. The upload button below:

Choose File button

Can I change Choose File text to something else?? Web-surfing can't help me.

I just want a "Choose Files" there.

Please, just say *Yes(+and how) or *No.

Thanks!

like image 375
Vitalyp Avatar asked Nov 23 '11 13:11

Vitalyp


2 Answers

Yes, I found best workaround! This is not a hack - we just need 2 buttons: original, and 'fake'.

  <input type="button" value="Choose Files">
  <input type="file">

Fake is displayed to user, and has

  z-index:1

Original is positioned above it, with

  z-index:2, opacity: 0; position: relative;

and has callbacks:

  :onmousedown=>"buttonPush('depressed')", :onmouseup=>"buttonPush('normal')"

  function buttonPush(buttonStatus) {
    if (buttonStatus == "depressed")
      document.getElementById("fake_btn").style.borderStyle = "inset";
    else
      document.getElementById("fake_btn").style.borderStyle = "outset";
  }

Thanks to this link http://www.dreamincode.net/forums/topic/15621-styling-a-file-browse-button/

Regards @Piskvor, @racar

like image 85
Vitalyp Avatar answered Nov 08 '22 13:11

Vitalyp


No, this is a part of the <input type="file"> control, and the webpage cannot control its appearance.

like image 43
Piskvor left the building Avatar answered Nov 08 '22 13:11

Piskvor left the building