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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:20:27+00:00 2026-06-10T09:20:27+00:00

I am working on a project and I’d like to use Jquery UI for

  • 0

I am working on a project and I’d like to use Jquery UI for some of the forms like adding and updating stuff instead of normal pages. I designed the dialog, set up the form but it works only if the form/div is in the same file as the button. I am using CodeIgniter for this project by the way.

So I have few questions:

  1. Does JQuery UI dialogs support using divs from separate files? (if the button is not in the same file as the form/div)
  2. If it does, how can I use a div that is in a different file (instead of placing the div in the same file with the button where I have few other components)?

Example:

index.php

<body>
<input type="button" id="add_new"  value="add new" />
 </body>

form.php

<body>
<div id='"new_user_form'> 
        <input type="text" id="name" />
        <input type="text" id="username" />
        <input type="password" id="password" />
        <input type="button" id="add_user"  value="add new" />
</div> 
</body>

custom.js

$(document).ready(function () 
{
    $('# add_new ').click (function ()
    {

            $("# new_user_form ").dialog
            ({

                title: 'Add new user',
                height: 400,
                width: 600,
                resizable: false,
                modal: true,
                draggable: false,
                buttons:
                    [
                        {
                            text: 'add new',
                            id: ' add_user ',
                            click: function()
                            {
                                alert("Testing 123...");
                            }
                        },
                        {
                            text: 'cancel',
                            click: function()
                            {
                                $(this).dialog('close');
                            }
                        }

                    ]

            })

         })

      })

thanks for reading, hope someone can help me!

  • 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-10T09:20:29+00:00Added an answer on June 10, 2026 at 9:20 am

    I don’t know why the load() function didn’t work but I found a better way to fix this problem.

    How I did it:

    users_view.php (previously index.php)

    <body>
    <input type="button" id="add_new"  value="add new" />
    
    <div id="new_user_form">
       <?php $this->load->view('add_user_form'); ?>
    </div>
    
    </body>
    

    add_user_form.php (previously form.php)

      <div> 
        <input type="text" id="name" />
        <input type="text" id="username" />
        <input type="password" id="password" />
        <input type="button" id="add_user"  value="add new" />
        <input type="button" id="cancel"  value="cancel" />
     </div> 
    

    custom.js

    $(document).ready(function ()
    {
    
          $("#new_user_form").dialog
          ({
    
                  title: 'Add new userт',
                  height: 400,
                  width: 600,
                  resizable: false,
                  modal: true,
                  draggable: false,
                  autoOpen: false
    
          })
    
          $('#add_new').click (function ()
          {
              $("#new_user_form").dialog("open");
          })
    
          $('#cancel').click(function()
          {
            $("#new_user_form").dialog("close");
          });
     })
    

    Thanks for the answers! I hope this will help other people 🙂

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

Sidebar

Related Questions

I have a working project that Im amending, it crashes after trying to use
I'm copying some objective c++ files over from another (working) project. I get no
I working on project, involving BT connection. I have performed tests with phones like
Im working on project to display rate on some field and I'm already get
I am working on Project where I have JQuery 1-Page Horizontal scrolling website using
I'm currently editing a working project with some experience on PHP. I know a
EDIT:This is from a working project of mine. Working. I declared some char arrays
I'm currently working on project with Haskell, and have found myself some trouble. I'm
I had a working project. After rearranging some code, I tried to recompile my
I'm curious if it is possible to move the written and fully working project

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.