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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:45:29+00:00 2026-06-01T16:45:29+00:00

I am using dialog api of jquery. Like this: <tr> <td>&nbsp;</td> <td colspan=3> <a

  • 0

I am using dialog api of jquery. Like this:

<tr>
    <td>&nbsp;</td>
    <td colspan="3">
            <a href='#' id='btnAddNewSkill'> add new</a>
    </td>
    <td>
        <div id="addNewSkillDialog" style='visibility: hidden;'>

        <form>
            <table width='100%' border='0'>
                <tr>
                    <td>
                        <label for="name">Name of New Skill</label> 
                        <input type="text" name="name" id="name" class=" ui-corner-all" />
                    </td>
                </tr>
            </table>
        </form>
        </div>
    </td></tr>

But here the problem is the form is visible by default and after first click to button it shows in a dialog thing, and after that it works correct (i.e. the dialog part)….so to overcome that thing I kept the visibility (of the Main div) as hidden in start and changing it on the fly as:

$('#btnAddNewSkill').click(function() {
        $("#addNewSkillDialog").css('visibility', 'visible').dialog({
            show : "fold",
            hide : "explode",
            resizable : false,
            modal : true,
            closeOnEscape : true,
            height : 120,
            title : 'Add New Skill',
            buttons : {
                "Add Skill" : function() {
                    alert('Add skill Clicked');
                },
                Cancel : function() {
                    $(this).dialog("close");
                }
            },
            close : function() {
                $(this).dialog("dispose");
            }
        });
    });

This is not the correct procedure to do this…..
how should I make a form as a dialog from the start itself

  • 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-01T16:45:30+00:00Added an answer on June 1, 2026 at 4:45 pm

    FYI, its not exact example, as i’m pressured for time (it’s time to leave) but i answered a question earlier today about ui-dialogs.

    see my Working Fiddle Here *fixed

    If I get a chance later, (if no one else gets to it) i’ll make you a fiddle with your exact example. But if you look in the link provided, you’ll see how to establish a dialog and and you’ll see the html for it is actually writtin on the HTML area (aka on your view in the body);

    I use a simple bit of css to ensure it stays hidden on load, despite the fact the jquery default is autoOpen: false. this is because, sometimes, there will be a slight flash of the dialog before its hidden if you DONT CSS it to display: none

    UPDATE

    Below I’ll post code with comments that is a rendition of your code with corrections

    <!-- CSS
    onload (in other words, place in header or in header link -->
    #addNewSkillDialog {
        display: none;
    }
    

    Dont forget to place dialog html on page. then add the following JS

    // you dont set the dialog in the click,
    // set it seperately, use the click to open it
    $("#addNewSkillDialog").dialog({
        //  HERE IS WHAT YOU'RE MISSING !!!
        autoOpen: false,
        //  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        show: "fold",   //  the animation on show
        hide: "explode",    // the animation on close
        resizable: false,   // prevents user from resizing
        modal: true,    //  puts a screen behind modal that prevents clicking on page
        closeOnEscape: true,    //  esc key will close dlg
        height: 120,    //  INNER height of dialog
        title: 'Add New Skill', // dlg title in ttl bar
        buttons: {  //  your own button set
            "Add Skill": function(e) {
                alert('Add skill Clicked');
            },
            Cancel: function(e) {
                $(this).dialog("close");
            }
        },
        close: function(e) {
            //$(this).dialog("dispose");    //  unnecessary
        }
    });
    
    //  then establish your click to open it
    $('#btnAddNewSkill').click(function(e) {
        $("#addNewSkillDialog").dialog("open");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to MonoTouch and thus MonoTouch.Dialog . Using the Elements API, I've
I'm using the MonoTouch.Dialog reflection API to create a new DialogViewController: var dashBoard =
I am using dialog plugin from jQuery UI 1.8.17. The following code works and
I am trying to create a wizard like structure using dialog boxes...So I replaced
I open a form as a modal dialog using ShowDialog. This dialog in turn
I created a page that has a JQuery based dialog using the standard JQuery
Using jQuery's dialog I came across the following quirk (tested in FF3): User selects
I am using the jQuery dialog widget with the modal option over a wordpress
I'm creating a site using drupal where I'd like to prompt my new users
Using JQuery, how would I call a JSONP API that required basic authentication? Can

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.