Search This Blog

Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Friday, June 29, 2012

Defining a function call in javascript

Current project at work has me learning more Javascript.
Here is a simple example of defining a function call for a button in a separate script file.
The project is ASP.NET MCV3 project and the javascript files are incorporated in Site.Master file.

Simple function call in Javascript:

<script type="text/javascript" src="<%= Portal.UrlHelper.VirtualPath %>/Scripts/portal-about.js?ver=<%= Portal.VersionHelper.Version %>">script>

portal-about.js
(function() {

    Portal.about = function() {
    
    };

})();

Strange new world at least for me ;)

Monday, November 7, 2011

VS2010 + MVC 2.0 + Javascript != Awesome

Okay, this is not a formula for success.
1) I cannot debug javascript by putting a VS2010 break point due to a bug in the MVC 2/3 that Microsoft admits is there but will not fix.  Has something to do with the fact VS2010 cannot debug silverlight and javascript at the same time and VS2010 mis-identifies what is running with MVC 2/3 framework.  That's just great...
2) Back up plan.... the ever useful alert("I'm hitting this face break point");
3) Plus robust exception handling native to javascript.
4) My love for case sensitive coding scripting languages.

Is Javascript the best we can do for a web UI language?

Given a choice, I'd pick python.