View initialization related javascript methods?

9 views
Skip to first unread message

Yogi

unread,
Oct 30, 2010, 11:01:30 PM10/30/10
to JavaScriptMVC
I have few fileds in view that require javascript initialization. As
an example jquery datepicker.
What's the recommend way on where to put these methods and where to
run from.

Ideally i think i want them in my view EJS file and be run after view
loaded.
RIght now i have to set my DIV inner html with view content and run
the javascript in my controller?

I can't see me to make running declared methods in ejs work from
controller.

As example i declared a fuction

<%

function init-my-view() {
// My Init code
}

%>

Now in my controller....
$("my-div").html(this.view....
I want to run

init-my-view();

This seems to fail...

Justin Meyer

unread,
Oct 31, 2010, 12:02:45 AM10/31/10
to javasc...@googlegroups.com
please post this here:


And we will answer it

Justin Meyer

Jupiter Consulting
\Development\Training\Support
847-924-6039
justin...@gmail.com



--
You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
To post to this group, send email to javasc...@googlegroups.com.
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.


Reply all
Reply to author
Forward
0 new messages