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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:47:59+00:00 2026-06-07T13:47:59+00:00

We wish to trow a modal popup telling the user to please wait until

  • 0

We wish to trow a modal popup telling the user to “please wait” until the forms finishes submitting.

Here is part of my _form.php (just a snipped for readable proposes):

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'event-form',
        'enableClientValidation' => true,
        'clientOptions'=> 
              array('validateOnSubmit'=>true, 
                'afterValidate'=>'js:function() {     
                         $("#publishErrors").empty();
                         $("#event-form_es_").empty();
                         i = true;
                         if($("#EntityEvent_active").is(":checked"))
                         {
                          $("#publishErrors").show().append("<p>Please check:</p>")
                          if($("#Event_name").val()=="")
                          {
                            $("#Event_name").addClass("error"); 
                            ...
                            ...

I confess I’m a little lost on this process and I’m not sure if this will even work, still:

I’m thinking about placing this:

$this->beginWidget('zii.widgets.jui.CJuiDialog'
        , array('options'=>array(
            'title'=>'My Title'
            , 'modal'=>true
            ))
);

echo 'Please Wait While Your Form is Being Submitted';

$this->endWidget('zii.widgets.jui.CJuiDialog');

at the very end of ‘afterValidate’ –

Is there a better approach ?

Please advice

  • 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-06-07T13:48:01+00:00Added an answer on June 7, 2026 at 1:48 pm

    There is already a jquery plugin for this: jQuery BlockUI plugin.

    But if you want to use CJuiDialog, just make sure that closeOnEscape is false, and modal is true, also autoOpen should be false.

    You could also use a jQueryUI Progressbar inside a CJuiDialog to show progress if you wish.

    Edit:

    Sample code to hide x button of the dialog:

    $this->beginWidget('zii.widgets.jui.CJuiDialog',
        array(
            'id'=>'mywaitdialog',
            'options'=>array(
                'title'=>'My Title',
                'modal'=>true,
                'autoOpen'=>false,// default is true
                'closeOnEscape'=>false,
                'open'=>// supply a callback function to handle the open event
                        'js:function(){ // in this function hide the close button
                             $(".class-of-closebutton").hide();
                        }'
             ))
    );
    

    To open the dialog: $("#mywaitdialog").dialog("open");.

    You can open the dialog in afterValidate, as you had guessed. While the form data is passed to the server the dialog will show, and after completion url navigation will occur(new page will be loaded).

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

Sidebar

Related Questions

I wish to create a sticky header. Everytime that the user scrolls down AND
I wish to know when another application finishes editing a file. I am aware
i wish to connecting webservices in java using apache,axis2 and eclipse. here i got
I wish to limit the number of characters that the user can enter, using
I wish to update the usernames for a user in the Git history, is
I wish to implement my software on a shareware basis, so that the user
I wish to run query on datasets. Is it possible. If yes please give
I wish to develop a sms application in C#.net. So please help me by
Wish you all good mood! Please help me with Unity. My App.config file contains:
I wish to make the uploaded file contents only viewable on the browser i.e

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.