Posts tagged javascript

There are 4 posts for the tag javascript

Manipulating history with the HTML5 History API and AngularJS

As I've mentioned earlier, I've been working quite a lot with AngularJS lately, most recently on a search function on a website. Naturally, since this is an ajax application, the search result page never reloads when I perform a search. Never the less, I would like to Be able to go back and forth between my searches with the standard browser functions See my new query in the location bar Reload the page and have the latest query - not the initial one - execute agai...

Posted by johan on March 20, 2013

Using an AngularJS directive to hide the on screen keyboard on submit

Recently, I’ve been working on a responsive web site running AngularJS.  In this, we have a search form. As search forms usually works, you enter a query in a text field, and then you click the button to search. Or, more likely, you hit enter. Now, since this is a responsive site, this needs to work on a phone too. This is were it gets a bit more tricky. When you click the text field, your on screen keyboard pops up. You enter your query, and click Enter, or Next, or Go or whatever t...

Posted by johan on March 07, 2013

Updated Anti-XSRF Validation for ASP.NET MVC 4 RC

In our project, we’ve been using Phil Haack’s method for preventing cross-site request forgeries for JSON posts by inserting the request verification token as a header in the request, and then using a custom ValidateJsonAntiForgeryToken attribute to validate it. And it’s been working just fine. However, with the recent release of ASP.NET 4 MVC RC, it didn’t work anymore. To my initial dismay, it didn’t even compile anymore. Turns out that the method, AntiForg...

Posted by johan on June 05, 2012

Resizing cross-domain Iframes

UPDATE 2013-03-20 This example is very obsolete, now that we have HTML5 and window.postMessage for sending messages between windows. Unless you are specifically targeting antique browsers like IE7, you should use that instead of this pile of garbage. ----------------- WARNING: OBSOLETE JUNK FOLLOWS ------------------------- Recently (last week, actually) I came across a problem that turned out to be quite a challenge for me. Possibly due to me lacking some javascript skillz. Anywa...

Posted by johan on May 25, 2010