Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

upload file plug-in not working

edited September 2012 in Vanilla 2.0 - 2.8

i tried according to: http://jasny.github.com/bootstrap/javascript.html#fileupload
but nothing happens

my code:
in header:

<script language="javascript" type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap-responsive.css" />
<script language="javascript" type="text/javascript" src="../bootstrap/js/bootstrap.js"></script>
<script language="javascript" type="text/javascript" src="../bootstrap/js/bootstrap-fileupload.js"></script>

in body:

<div class="fileupload fileupload-new" data-provides="fileupload">
    <div class="fileupload-preview uneditable-input"></div>
    <span class="btn btn-file">
        <span class="fileupload-new">Select file</span>
        <span class="fileupload-exists">Change</span>
        <input type="file" />
    </span>
    <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
</div>
<script>
    alert("1");
    $('.fileupload').fileupload();
    alert("2");
</script>

on running the page i get only alert("1")
any ideas why?

Tagged:

Comments

  • edited May 2014

    Please remove the line 12: $('.fileupload').fileupload(), it would be work.

Sign In or Register to comment.