Image from Pexels
Tagged articles - JavaScript
Found 35 articles tagged with JavaScript
22
Mar
2015
Enabling CORS only for specific domains in ASP.NET
.NET229 titlesEnable cross origin resquests only for certain domains in ASP.NET
0
Cross-origin resource sharing (CORS) means that page from other domain can make request to some resource which is on other domain. For example, if you try to invoke some WEB API method which is running on different domain you will get exception in the script.
By default CORS are disabled in ASP.NET bot you can easily enable them just by modifying web.config for IIS7 and newer versions pf IIS.
...read more
15
Mar
2015
Detect when file download request is finished with jQuery
JavaScript31 titlesFiguring out when file download request completes with jQuery
0
Recently I started a small free service app for extracting icons from application files .exe and .dll. It is called IconExtract and it is hosted at http://iconextract.dejanstojanovic.net/
It basically takes application file you submit, extracts icons and returns them zipped, so beside long running upload there is some processing on the back-end when file is uploaded as well.
...read more
03
Mar
2015
The ways of loading JavaScript files onto your page
JavaScript31 titlesVarios ways to load the script on the page and boos performances
0
Recently I was working on speeding up my website. As a reference I user Google PageSpeed Insights.
There were few things, but among them was one that was that really poked my eyes...read more
14
Jan
2015
Deserializing JSON to anonymus type in C#
.NET229 titlesBinding JSON string to anonyms type
0
JSON is really easy to use and it really boosts performances since it is a lot lighter than XML and SOAP.
Sometime it can be really annoying having to create POCO class every time you need to deserialize JSON value passed from client side in ASP.NET web applications. During extending project functionality this number of POCO classes can significantly grow to that matter that you have a bunch of classes for even the simplest task you have to do with JSON value.
...read more
30
Dec
2014
Facebook Album Browser JQuery Plugin
JavaScript31 titlesSimple Facebook public albums browser plugin for JQuery
0
Reponsive jQuery plugin for browsing public albums of a Facebook account. Plugin is suitable for both desktop and mobile websites....read more
02
Dec
2014
CSS Media Queries instead of JavaScript code
JavaScript31 titlesUsing CSS Media Queries instead of JavaScript or JQuery code
0
Before CSS3 coming out, if you needed to change the layout programatically when window size is changed you would have to write a small JavaScript or JQuery to handle window resize event and perform some action on the DOM to addapt your layout.
In case you would use JQuery (which is most of the cases as I do not remember last time I wrotw plain JavaScript code) you would have to hook to window resize event and handle every resize. Based on your condition you would apply some CSS to specific element or strip style from it.
...read more
17
Nov
2014
Working with canvas on images loaded from different domain
JavaScript31 titlesSecurityError: The operation is insecure. canvas issue
0
Recently I'we been working with HTML canvas by using cropper jQuery plugin http://fengyuanchen.github.io/cropper. It was working fine until I had to load images from Facebook.
As soon as I loaded image from facebook, script was crashing with a security error:
...read more
11
Sep
2014
Extension method equivalents in JavaScript
JavaScript31 titlesHow to write an extension method for a type in JavaScript
0
For someone who works in C#, extension methods are one really useful feature introduced in .NET framework.
I use extension methods a lot because they are so nicely integrated with intellisense and you can access them really easy.
...read more
27
Aug
2014
Fastest way to return JSON result from a controller
Umbraco CMS25 titlesResturn JSON in MVC controller action
0
Recently I had to develop a form on a page which loads secondary dropdown list items based on selection in a primary dropdown list.
Because secondary list items are basically children elements of the one selected in primary I just had to run through all children and just return text-value pair object to JavaScript to populate secondary dropdown list.
...read more
31
Jul
2014
Testing mobile website client side functionality on desktop
JavaScript31 titlesDevelopment and testing of mobile websites on desktop
0
Recently I have posted an article about new HTML5 features for mobile devices where some of the new JavaScript APIs are described.
If you decide to apply any of these new cool features on your mobile website you would first want to test them before you publish them on the real website. You can always expose the website to you mobile device and navigate, but it really takes additional time and after 10th time you would really get annoyed by doing this.
...read more
30
Jul
2014
HTML5 JavaScript API for mobile devices
JavaScript31 titlesEmpower website with new HTML5 JavaScript API
0
HTML5 is awesome for desktop websites and believe it or not, even more awesome for mobile devices. In the following article, I'll show you few HTML5 APIs which can be invoked from JavaScript which directly interact with your mobile device, so let's start.
Geolocation API
...read more
28
Jul
2014
Use GitHub for hosting JS and CSS files
JavaScript31 titlesHow to use your CSS and JS files direcly from GitHub
0
Recently I've started JQuery plugin project on GitHub and decided to provide examples via JSFiddler. I could easily take latest files and host it on the same host as this blog but that would make a headache for me as I would have to update files on my host as soon as I update file in GitHub.
So I googled a little bit and found a solution...read more
29
Jun
2014
Database Change Notifications in ASP.NET using WebSocket
.NET229 titlesDisplay database change on website in real-time
0
Database table changes are usually not displayed right away in an application, escecially if it is a web application. With HTML5 and Web API that is about to change...read more
25
Jun
2014
Using WebSocket in MVC4
.NET229 titlesReal time data update with MVC4 and HTML5 features
0
Ajax is really cool. You can pull your data without refreshing the whole page, but increasing user experience and downsizing bandwidth for website.
If you have some live data which is changing really often, the best way to display it on website is to use pulling mechanism...read more
13
Jun
2014
Request different data type from Web API with JQuery
JavaScript31 titlesXML/JSON in return result of Web API REST service method with JQuery
0
In my previous article Different data type in Web API response of the same method I described how to get different response with HttpWebRequest in C#. Here I will demonstrate how to achieve the same thing but in JQuery client side code...read more
.NET
5
Jun
2022
Using dotnet nuget package vulnerability scan in Azure DevOps build
Listing nuget vulnerabilities and controlling build in Azure DevOps
5
May
2022
Protecting static files in ASP.NET Core using custom middleware
Restricting access to specific static content with middleware in ASP.NET Core
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
Using more than one authentication schemes in webapi projects
12
Dec
2021
Controlling the flow of migrations in EF Core
Altering EF Core migrations execution order
28
Nov
2021
Unit of work pattern with Dapper
Implementing unit of work pattern with Dapper in .NET 5
21
Sep
2021
Adding display name to Enum values
Implementing additional values for Enum items in C#
JavaScript
28
Oct
2018
HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
8
May
2018
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
9
May
2017
Non blocking CSS load on the page
Load external CSS files in an async manner
16
Mar
2017
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
17
Jan
2016
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
11
Jan
2016
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
SQL/T-SQL
22
Feb
2022
Select column names with values from SQL Server database
Fetching column names with its value in T-SQL using built in JSON methods
23
May
2020
Identifying opened connections for the specific application in SQL Server
Connection listing queries in SQL Server
3
May
2018
Reading JSON data in T-SQL on SQL Server
Extracting values from JSON string on SQL Server using T-SQL
28
Apr
2016
Create XML/HTML with T-SQL
Generating XML/HTML output in SQL Server
24
Nov
2015
IP address to octets split in TSQL
Split IP addresse into octets in SQL Server
20
Jul
2015
Getting first and last second of the current year, month and day
Using minimum and maximum date time in SQL query
Umbraco CMS
2
Mar
2018
Minify HTML output of your pages
Minification of HTML output using ASP.NET IHttpModule
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Simple sitemap.xml Umbraco handler
2
Mar
2015
Accessing UmbracoHelper in HttpHandler request
Working with UmbracoHelper and IPublishedContent in HttpHandler
14
Sep
2014
Same page language switching in Umbraco
Land on the same page in different language in Umbraco using Relations
4
Sep
2014
Getting cropped image the smart way
The way to get cropped image URL with option to load original image too
27
Aug
2014
Fastest way to return JSON result from a controller
Resturn JSON in MVC controller action