Skip to content
Advertisement

Tag: webforms

Can’t get the JS script to output data on HTML page

My code below is a simple form which takes an integer, and a yes/no radio button pair. If ‘yes’ is selected (the left option) then the value you entered * 0.13 should be displayed – if ‘no’ is selected (or neither are selected) then the value 0 should be displayed. It is not working as expected – how can I

Timer counter down in javascript (ASP.Net)

I use below code to make a timer counter down, the console log works well (10,9,8,…) but I can’t see the changes on the label Edit I use below code as mention in the answers too, but doesn’t work. Even the console log doesn’t work How can I fix this problem!? Answer Ok, the problem here is if you look

FileUpload: Get filenames with JS not working

I want to get filenames and put it in label lbName but this code is not working. I used asp:FileUpload. This is my code: <asp:FileUpload ID=”FileUpload1″ AllowMultiple=”true” runat=”server” Onchange=”upload()”/> <asp:Label ID=”lbName” runat=”server” ForeColor=”Gray” Visible=”True”></asp:Label> and JS code: Answer You could use jQuery and bind a change event to the input type=file. Or if you want to make your javascript work:

Advertisement