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

  • Home
  • SEARCH
  • 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 6980419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:00:56+00:00 2026-05-27T18:00:56+00:00

I am trying to call a javascript function when the value of a Dojo

  • 0

I am trying to call a javascript function when the value of a Dojo auto completer changes.

Calling the javascript function from the “onChange” attribute has no effect (I mean the function is not called/executed).

In the javascript function I want to:

  1. Call a struts2 action.

  2. Change the value of a hidden field.

For calling the action I have another way :
publishing a topic using attribute ” valueNotifyTopic=”topicName” “, then I can call an action by listening to the topic.

But I cant change the value of the hidden field through this way. So I need to call a javascript function

Please advise

Thanks!!

Edit:

This is the code in the jsp:

<s:url id="scriptURL" action="viewContactInfo" />
<sd:div href="%{scriptURL}" listenTopics="viewContactInfo" formId="contactInfo" showLoadingText="false" preload="false">
<s:form id="contactInfo">
    <sd:autocompleter autoComplete="false" name="customer" list="customerList" valueNotifyTopics="viewContactInfo"/> 
    <sd:autocompleter autoComplete="false" name="contact"  list="contactList"  valueNotifyTopics="viewContactInfo"/>
    <s:hidden id="chngd" value="initial"/>
</s:form>
</sd:div>

Here if I change “valueNotifyTopics=’viewContactInfo'” to “onChange=’dojo.event.topic.publish(‘viewContactInfo’);'” the action “viewContactInfo” stops getting called. Whereas the same thing (the “onChange” one) works with other elements (in other places in my project).

  • 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-27T18:00:56+00:00Added an answer on May 27, 2026 at 6:00 pm

    I had started another thread for this question.

    I figured out the solution and have posted the answer here :

    Cannot find a way to pass a hidden value to the action file

    Hope this helps!!

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

Sidebar

Related Questions

I am trying to call my function named isUrgencyTypeValid from my javascript code but
I'm trying to call a Flash function from javascript passing complex data types as
I am trying to call a javascript function from asp.net codebehind using onclientclick for
I have a javascript function from where I am trying to call the serverside
Easy one for Tuesday morning... Im trying to call a javascript function from inside
In my javascript function I am trying to call my global variable that is
I am trying to call a servlet from jQuery's .ajax() function. At the moment
I'm trying to pass a parameter from php into my javascript function inside html.
how can i call a VB function - deleteevent() in usercontrol.ascx.vb from a javascript
I'm trying to call a php function from jquery function to calculate some values

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.