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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:23:57+00:00 2026-05-15T05:23:57+00:00

I need my dialog to open when the page is loaded automatically. What is

  • 0

I need my dialog to open when the page is loaded automatically. What is the way to do it using jquery. Without any user interaction to open it.

I tried this code but it dint work

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="css/style.css" media="screen,projection" />
        <script type="text/javascript" src="script/jquery-1.4.2.min.js"></script>
        <link type="text/css" href="css/jquery-ui-1.8.1.custom.css" rel="stylesheet" />
        <script type="text/javascript" src="script/jquery-ui-1.8.1.custom.min.js"></script>
        <script type="text/javaScript">
            $(function(){
                $('#dialog').dialog({
                    autoOpen: true,
                    width: 600,
                    buttons: {
                        "Ok": function() {
                            $(this).dialog("close");
                        }
                    }
                });
            });
        </script>
    </head>
    <%
                if (session.getAttribute("user") == null) {
                    response.sendRedirect("index.jsp");
                }
    %>
    <body>
        <div id="wrap">
            <div id="header">
            </div>

            <div id="leftside">
                <h2 class="hide">Sample menu:</h2>
                <ul class="avmenu">
                    <li><a href="dashboard.jsp" class="current">Dash Board</a></li>
                    <li><a href="createpoll.jsp">Create Poll</a></li>
                    <li><a href="availpoll.jsp">Vote Poll</a></li>
                    <li><a href="viewresults.jsp">View Results</a></li>
                    <li><a href="underconstruction.jsp">Settings</a></li>
                    <li><a href="logout">Log Out</a></li>
                </ul>
            </div>

            <div id="contentwide">
                <%@page import="com.jSurvey.entity.question" %>
                <%@page import="com.jSurvey.controller.questionJpaController" %>
                <%
                  //code to write data to database
                %>
                <div id="dialog"><p>Data Added successfully</p></div>
            </div>
            <div id="footer">
            </div>
        </div>
    </body>
</html>

Please help.

  • 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-15T05:23:58+00:00Added an answer on May 15, 2026 at 5:23 am

    use autoOpen: true, to make it open directly when page loads

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

Sidebar

Related Questions

So i am using the jQuery UI library to open new dialog windows, when
On pdf downlaod link need to open a jQuery dialog and have a form
I have created app using jQuery Mobile and need to get a Dialog box
I need to pop-up a file open dialog in a web page, and have
I have a simple page that I need to open the print dialog on
I need to load aspx page into jQuery UI's modal dialog window. I used
I want to show a popup screen on my page using JQuery UI Dialog
I'm trying to open a jQuery dialog using AJAX. The content of the dialog
I need to open the search dialog (it's opening, for example, when I click
I need to pop up a quick dialog for the user to select one

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.