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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:41:52+00:00 2026-05-26T22:41:52+00:00

Hello dearest community. I have trouble in the last two days, that I can’t

  • 0

Hello dearest community.

I have trouble in the last two days, that I can’t solved.
The problem is I had a Dojo Form defined this way :

<div id="reportBulananDialog" jsId="reportBulananDialog" dojoType="dijit.Dialog" title="Laporan Bulanan" draggable="true">
        <div dojoType="dijit.form.Form" id="reportBulananForm" jsId="reportBulananForm" action="action/display_reportBulanan.php" method="post">
...

And the connection call in a script.js file defined this way :

dojo.connect(mnuLaporanBulanan, "onClick", null, function(e) {
        dijit.byId("reportBulananDialog").show();
    });
 dojo.connect(reportBulananForm, "onSubmit", null, doReportBulananForm);
    dojo.connect(reportBulananCancel, "onClick", null, function(e) {
        reportBulananDialog.hide();
    });

You can see that I connect onSubmit event to function doReportBulananForm defined this way:

function doReportBulananForm()
{   
    alert('test1');
    dojo.xhrPost({
        form: this.domNode,
        handleAs: "json",
        load: function(data) {
            alert("after call: " + data);
            if(data.success) {
                reportBulananDialog.hide();
                okDialog.set("title","Menampilkan report");
                okDialogMsg.innerHTML = "Report";
                okDialog.show();
            }
            else {
                okDialog.set("title","Error creating group");
                okDialogMsg.innerHTML = data.error;
                okDialog.show();
            }
        },
        error: function(error) {
            okDialog.set("title","Error creating group");
            okDialogMsg.innerHTML = error;
            okDialog.show();
            alert("error " + data);
        }
    });
    alert('test2');
}

The problem is, the application always redirect the flow of application to the file action/display_reportBulanan.php, not handling its json output..

This is very confusing, what did I do wrong?

Thanks,
Eko

  • 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-26T22:41:53+00:00Added an answer on May 26, 2026 at 10:41 pm

    I think you have to prevent the default form submit.
    In your onSubmit handler, do this instead :

    function doReportBulananForm(evt)
    {   
        evt.preventDefault();
        alert('test1');
        // The rest of your code goes here
    }
    

    You may also add an event argument to your function call in the connect :

    dojo.connect(reportBulananForm, "onSubmit", null, doReportBulananForm(evt));
    

    See this page for details : http://dojotoolkit.org/reference-guide/quickstart/events.html

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

Sidebar

Related Questions

Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
Hello dearest community, I run into problem of creating an exact MD5 of a
Hello dearest community, I am just a regular use of git in Windows. Now
Hello dearest community, I am trying to build a simple AutoUpdate application using VB.NET.
Hello dearest community, First of all, I hope my intention is not missconcept. I
Hello dearest community I just given a task to develop a mobile application for
Hello again dearest Experts, I have an ecommerce site at http://www.millenniumhealthproducts.com The site was
Hello guys can you please help me with this problem. When a simple image
Hello dearest community, EDITED This is my solution, based on Devart answer. I slightly
Hello guys i have a small problem at my console application i have a

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.