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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:27:42+00:00 2026-06-04T16:27:42+00:00

I need to output alert message if val = -1 , but the problem

  • 0

I need to output alert message if val = -1, but the problem is that this message appears at the bottom of the page and this does not depend on the value of val.

if ($val == -1) 
        echo '
        <script>
            $(function() {
                $( "#dialog:ui-dialog" ).dialog( "destroy" );
                $( "#dialog-message" ).dialog({
                    modal: true,
                    buttons: {
                        Ok: function() {
                            $( this ).dialog( "close" );
                        }
                    }
                });
            });
        </script>
        ';
    else { //...  }


<div id="dialog-message" title="Process failed.">
<p><span class="ui-icon ui-icon-circle-check"
    style="float: left; margin: 0 7px 50px 0;"></span> Error message.</p>
</div>
  • 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-04T16:27:44+00:00Added an answer on June 4, 2026 at 4:27 pm

    To hide the div use css

    #dialog-message{
     display:none;
    }
    

    For a better alert there is a nice plugin for Alert, Confirm & Prompt use that plugin

    http://labs.abeautifulsite.net/archived/jquery-alerts/demo/

    It’s download page is here

    http://www.abeautifulsite.net/blog/2008/12/jquery-alert-dialogs/

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

Sidebar

Related Questions

I need to output some text as bash script, but in a script. I
It has suddenly happened that I need to output a couple of strings in
I'm writing an XSLT template that need to output a valid xml file for
Spoiler alert: this is related to Problem 14 from Project Euler. The following code
I am trying to call a page with ajax, but from another server. This
This is my code UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@Added to Cart message:@Some items
I have a website that has SignalR hub, in this hub I need to
The problem is not that difficult, I just can't get my head around it
Can someone tell me why this alert is empty? var pending_dates = []; $.getJSON('/ajax/event-json-output.php',
I have trying this for some time now but I am not able to

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.