bitScry

  • Home
  • About
  • Blog
  • Contact

JavaScript

About this site

This is a blog to help me remember some of the coding challenges I’ve faced and hopefully help others out if they’re suffering the same problems.

Recent Posts
  • Killing a Process Locking Port on a Mac
  • Mocking Hangfire BackgroundClient Jobs
  • Running Shinobi CCTV on a Raspberry Pi
  • Visual Studio CoreCLR Error
  • Adding Healthchecks to a .NET Core 6 API
Tag Cloud

.NET Core AAD API ASP.NET Core Authentication Authorization Azure Azure Active Directory Azure Function Azure Storage Blob Bootstrap C# Cloud Storage Console Application CSS DataTable Dependency Injection Dictionary Entity Framework Enum Extension Google GZip HTML IP Address JavaScript jQuery JSON List MVC MVC 6 Newtonsoft RestSharp Serilog SQL SSDT Stored Procedure Stream String Table Table Storage Web App Web Application WordPress

Programming

Escaping the @ Symbol in an MVC View

I’ve been working with OData recently and one thing that briefly stumped me was that the property names begin with @ and in an MVC view the @ symbol is used to indicate C# code so when I tried to reference a property in JavaScript the page then thought I Read more…

By Shinigami, 2 years2 April 2020 ago
Programming

JavaScript Cookie Function

If for whatever reason you can’t just use a nice jQuery plugin like js-cookie then the below Javascript will serve as a basic method of setting and getting cookies.

By Shinigami, 3 years19 February 2019 ago
Programming

Getting and Setting URL Parameters with JavaScript

Although there’s probably plenty of good plugins to do this my code for getting and setting URL parameters is below. These take the URL to parse as an argument as I wanted to be able to update parameters in linked URLs as well as the current URL which would be Read more…

By Shinigami, 4 years17 August 2018 ago
Programming

Using NPM and Gulp in Visual Studio 2017

By default new Web Applications created in Visual Studio 2017 use Bower for managing external libraries such as jQuery and Bootstrap, however Bower is no longer best practice (and seemed a bit flaky in Visual Studio anyway) and so for new projects I now use npm for managing packages. Using Read more…

By Shinigami, 4 years13 March 2018 ago
Programming

Uploading Files to Azure Blob Storage from the Browser

As part of an ongoing project I’ve been trying to upload files from from the browser to an ASP.NET Core MVC site, however there appears to be a hard limit preventing uploading files greater than ~28.6 MiB in size which I can’t manage to figure out a way around. As Read more…

By Shinigami, 4 years12 March 2018 ago
Programming

JavaScript Week Picker

One of the new input types in HTML5 is week which allows you to specify a week period. Unfortunately although Chrome brings up a nice datepicker to allow you to select the week Firefox and IE12 and earlier don’t implement this and so just display a standard input text box. Read more…

By Shinigami, 5 years8 February 2018 ago
Programming

Serializing JSON Values Without Quotes

I have a package called ChartJSCore which generates the required JavaScript for creating Chart.js charts in a web application. For the most part the JS for this is essentially JSON so this works by serializing chart objects using Newtonsoft which automatically quotes both the object name and value. However, some Read more…

By Shinigami, 5 years23 October 2017 ago
Programming

Posting Data to an MVC Controller With jQuery

The easiest way to post data from a view to a controller action is by adding a form and submit button and letting most of the hard stuff happen automatically. Unfortunately this doesn’t really work in cases where data needs to be submitted by a javascript function, in these situations Read more…

By Shinigami, 5 years3 October 2017 ago
Programming

Popup Message Box Form

How to display a popup form from a button/link click in a webpage I was trying to figure out how to get a popup form to appear from a button click in a table, with the form making use of data from the row in which the button is clicked. Read more…

By Shinigami, 6 years10 January 2017 ago
  • Facebook
  • Twitter
  • Instagram
  • Email
Hestia | Developed by ThemeIsle