0
I tried with Bootstrap like this:
<!-- Bootstrap Modal Dialog -->
<div class="modal fade open" id="myModal" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" >
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">
<asp:Label ID="lblModalTitle" runat="server" Text="Enviar arquivos"></asp:Label></h4>
</div>
<div class="modal-body">
<asp:FileUpload ID="FileUp" AllowMultiple="true" runat="server" />
<br />
Tag:<asp:TextBox ID="tbTag" runat="server" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
</div>
<div class="modal-footer">
<asp:Button runat="server" CssClass="btn ui-icon-cancel small" ID="UpluodButton" OnClick="UploadButton_Click" Text="Enviar" />
</div>
</div>
</div>
</div>
And the next script in the <head>
:
<script>
$(function () {
$('#<%=tbTag.ClientID%>').tbTag({
autocomplete: {
source: ['red', 'blue', 'green', 'yellow', 'violet', 'brown', 'purple', 'black', 'white'],
delay: 100
},
showAutocompleteOnFocus: true
});
}
</script>
But it doesn’t work.
<script type="text/javascript" src="../Scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../Scripts/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="../Scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="../Scripts/bootstrap.min.js"></script>
Reference: http://jquery-plugins.net/tokenfield-jquery-tag-token-plugin-for-bootstrap
How are you referencing Bootstrap and Tokenfield?
– Randrade
What about the Tokenfield references you want to use? Open the browser console, and check for errors.
– Randrade
Uncaught Typeerror: Undefined is not a Function
– War Lock
in javascript la, for ta inside the head, below the references of js.
– War Lock
the line error $('#<%=tbTag.Clientid%>'). tbTag({
– War Lock
Let’s go continue this discussion in chat.
– War Lock
placed and now appears this: Uncaught Syntaxerror: Unexpected end of input
– War Lock
@Renilsonandrade pq erased the answer?
– War Lock
what other way you said you could solve?
– War Lock
I cannot say why they deleted the answer. And I did not follow, to know what the answer was about.
– Randrade
tu Falu do ctl00$Contentplaceholder1$tbTag, coloco?
– War Lock
Let’s go continue this discussion in chat.
– Randrade
@Renilsonandrade as well as tokenfield references? what is this?
– War Lock
I’ve referenced tokenfield and nothing
– War Lock
@Warlock The error by not closing
$()
in the Javascript code was caused when pasting the code here in the question?– Renan Gomes