Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3941188
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:30:39+00:00 2026-05-20T00:30:39+00:00

I recently watched Dav Glass’ talk on YUI and node , and the server-side

  • 0

I recently watched Dav Glass’ talk on YUI and node, and the server-side rendering of widgets got me particularly interested.

I want to do something similar, while still being able to use javascript for the widgets on the client side. The problem I am facing is how to run code associated with the widget (adding click events. etc) once the page is loaded.

One way of doing it could be to write an init function for each widget, then turn it into a string and put it in a script-tag along with the rendered html, but I don’t think that’s a very pretty solution.

Can anyone think of a better solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:30:39+00:00Added an answer on May 20, 2026 at 12:30 am

    Have you considered using Dojo? It also has a great widget system and parses the widgets out of the html.

    Rolling your own widget system has a lot of complications that you will run into, while building on Dojo will give you a ton of great components to start with.

    you can just set dojo djConfig=”parseOnLoad:true” in the dojo script tag and dojo will parse your widgets for you.

    You can also make your own widgets and do some custom init stuff in the widget postCreate method, which is like your init method you mention.

    See this page for more about Dojo widget methods: http://dojotoolkit.org/reference-guide/dijit/_Widget.html

    I have built a lot of my own Dojo widgets and really like the framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently we got a new server at the office purely for testing purposes. It
I watched this webcast recently, and I got the sense that a lot of
I recently watched this youtube tutorial on the Null Object design pattern. Even though
Recently I tried CodeSmith templates for NHibernate. As many of you might watched, there
Recently, I started changing some of our applications to support MS SQL Server as
I'm trying to unit test a custom action result. I recently watched Jimmy Bogard's
Recently i watched a tutorial from youtube ( http://www.youtube.com/watch?v=8mwKq7_JlS8 ) The boy is typing
I recently installed the add-on DownThemAll into my firefox and as I watched it
Recently I've started to develop Android Soft Keyboard and got some problem with preferences.
I recently watched the 'Network Apps for the iPhone OS' videos for WWDC 2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.