The following Jquery & HTML produces a barcode128 and all works fine.
I'm trying to call this JQuery Script from a code behind page in asp.net from a page load event as I want to pass a value into the bar code
I've tried several variations of the code below with no success. Any help will be greatly appreciated. First time using Jquery and i don't do a lot of JS.
HTML:
</head>
<script src="[URL unfurl="true"]http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"[/URL] type="text/javascript"></script>
<script src="scripts/CODE128.js"></script>
<script src="scripts/JsBarcode.js"></script>
<script>
$(document).ready(function () {
$("#barcode").JsBarcode("testdata", { width: 1, height: 50 });
});
</script>
<body>
<form id="form1" runat="server">
<div>
<asp:Image runat="server" ID="barcode" />
</div>
</form>
</body>
I'm trying to call this JQuery Script from a code behind page in asp.net from a page load event as I want to pass a value into the bar code
I've tried several variations of the code below with no success. Any help will be greatly appreciated. First time using Jquery and i don't do a lot of JS.
Code:
ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "javascript", " JsBarcode(#barcode, 'Newvalue', { width: 1, height: 50 })", True)