This project has moved. For the latest updates, please go here.

Visual Studio LightSwitch 2013 HTML Client

Jul 29, 2014 at 6:17 PM
The documentation is great, and easy to follow for a standard website. However, I am working on a LightSwitch HTML application in Visual Studio 2013. The end result is an HTML5 application that is largely built on jquery. I've successfully added other jquery libraries to the project, but I can't get this one to work.

Since the documentation doesn't cover LightSwitch, I made some guesses. I added the following code to the code behind javascript, as I usually do when I want to modify an element after it renders.
myapp.ScreenName.textArea_PostRender = function (element, contentItem) { //This is genereated by VS
All that I get is the element rendered with a red box over it, indicating an error, the error text is "CustomControl error: textArea_postRender() method error: TypeError: undefined is not a function"

I've tried a number of variations, and I'll keep hammering at this, but I'm hoping somebody here knows the answer and can save me a little time.

Thank you,
Jul 30, 2014 at 12:47 AM
Edited Jul 30, 2014 at 12:47 AM
All right, I found the problem. the deafult.htm file in my project had two blocks of script tags. One set in the head, and another set in the body of the document. I moved the script reference from the head to the body, problem solved.
Marked as answer by rbigelow on 7/29/2014 at 4:47 PM