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 6356583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:59:28+00:00 2026-05-24T22:59:28+00:00

I have a Dojo tab-container and when I click on certain buttons, a new

  • 0

I have a Dojo tab-container and when I click on certain buttons, a new tab is added dynamically with its contents downloaded via Ajax. The tabs contain dynamic form elements which are parsed and loaded by Dojo just fine. I am also including Javascript blocks which are specific for each tab and those are downloaded as well via Ajax… however, none of the Javascript blocks execute!

Example of tab content:

<input id="test" name="test" type="text" dojoType="dijit.form.ValidationTextBox" />

<script type="text/javascript">
   dojo.connect(dijit.byId('test'), 'onClick', function(evt){
       alert('testing 123');
   });
</script>

However, if I do this instead the events trigger just fine:

<input id="test" name="test" type="text" dojoType="dijit.form.ValidationTextBox">
    <script type="dojo/method" event='onClick'>
         alert('testing 123');
    </script>
</input>

My question is, why don’t Javascript blocks in the first example work? is this a Dojo limitation? Also, I am also trying to set properties and values for the widgets AFTER they’ve been loaded. How do i active that given I have to use something like dojo.addOnLoad() which won’t work because it requires a Javascript block and that doesn’t work as per the first example… There is no equivalent widget onLoad event so I can’t use the second method either… Any ideas how to go about doing this?

  • 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-24T22:59:29+00:00Added an answer on May 24, 2026 at 10:59 pm

    The “tab content” is actually a Content Pane element. You can’t call a javascript inside a content pane unless you use <script type="dojo/method">. At least this is what I know.

    Update: ifyou’ll use dojox.layout.ContentPane instead of the dijit.layout.ContentPane all the problems regarding the js inside it will vanish. From Dojo Reference Guide:

    dojox.layout.ContenPane is an extension to dijit.layout.ContentPane providing script execution, among other things.

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

Sidebar

Related Questions

I am new to dojo. I have three divs; the first div has 10
I have been using Dojo hosted on Google's CDN. I just downloaded the development
I'm kinda new to Dojo toolkit. There are certain issues which I would like
I have a number of ajax calls with content being inserted by dojo.place. I
I have a dojo.data.ItemFileReadStore as follows: var partyStore = new dojo.data.ItemFileReadStore({ id: 'partyStore', data:
I'm starting to use Dojo; this is (essentially) my introduction to AJAX. We have
i use dojo tab container and content pane to set up a search dialogue
I have Dojo, it has its own localization. I use Dojo to communicate with
I have a dojo.datagrid in one of my pages. Datagrid and its store(by calling
I have a Dojo SubmitButton with jsId=saveParamButtonWidget. I overrided its onClick method by putting:

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.