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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:54:39+00:00 2026-05-20T00:54:39+00:00

I can’t figure out how to get the options set for draggable and resizeable

  • 0

I can’t figure out how to get the options set for draggable and resizeable for the jquery.ui.dialog. I have a JS file that is called from the main page:

/js/rental/add.js:

var additempopup = null;     
$(document).ready(function() {
        var $dialog = $('#adddialog').load('additem')
            .dialog({
                autoOpen: false,
                title: 'Add Item',
                width: 'auto',
                position: 'center', 
                resizeable: true,
                modal: true,
                draggable: true,
                closeOnEscape: true,
                closeText: 'close'
            });

        $('.jsAddItemPopup').click(function() {

            $dialog.dialog('open');
            return false;
        });
        $('#modalclose').click(function() {
            $dialog.dialog('close');
            return false;
        });
        additempopup = $dialog;
     } );

It is called from the main page which is a cakephp view.

excerpt from /views/rentals/add.ctp:

<?php
    $javascript->link('jquery/js/jquery-1.4.4.min', false);
    $javascript->link('jquery/ui/jquery.ui.core', false);
    $javascript->link('jquery/ui/jquery.ui.widget', false);
    $javascript->link('jquery/ui/jquery.ui.dialog', false);
    $javascript->link('jquery/rentals/add.js', false);
       echo $html->css('ui-lightness/jquery-ui-1.8.9.custom');

?>
<?php
echo $html->link(
'Add Item', '#', array('title' => 'Add Item', 'class' => 'jsAddItemPopup'));
?>
<div id="adddialog" class="adddialog" style="display: none;"></div>

the pop up is loading the following view.

excerpt from /views/rentals/additem.ctp:

  <div id='ajax-content'>
<?php   
 echo $ajax->form('edit', 'post', array(
                        'model'    => 'RentalLineitem',
                        'url'      => array( 'controller' => 'rentals', 'action' => 'additem')
));   ?>

<table>

    <tr>
        <td style="text-align: left;">
             <?php  echo $this->Form->submit('Cancel', 
                array('name' => 'cancel', 
               'onclick' => "additempopup.dialog('close'); return false;")); ?>
        </td>
        <td style="text-align: right;">
             <?php  echo $this->Form->submit('Add Item', array('name' => 'Save')); ?>
        </td>
    </tr>
    </table>

    <?php   echo $this->Form->end();   ?>
    </div>

Everything works, the Add Item link brings up the modal dialog, the “Cancel” in the modal dialog closes the window, the “Add Item” causes an Ajax post back correctly, but it is poping up on the upper right of the screen, instead of in the center, and the dragging and the resizing is not working. and I’m getting a bit frustrated trying to get this to work. I’ve tried mucking around for a while to no avail.

UPDATE: AS per the solution suggested, I was missing dependencies, I added them to the main page /view/rentals/add.ctp:

<?php
    $javascript->link('jquery/js/jquery-1.4.4.min', false);
    $javascript->link('jquery/ui/jquery.ui.core', false);
    $javascript->link('jquery/ui/jquery.ui.widget', false);
    $javascript->link('jquery/ui/jquery.ui.mouse', false);
    $javascript->link('jquery/ui/jquery.ui.draggable', false);
    $javascript->link('jquery/ui/jquery.ui.resizable', false);
    $javascript->link('jquery/ui/jquery.ui.position', false);
    $javascript->link('jquery/ui/jquery.ui.dialog', false);
    $javascript->link('jquery/rentals/add.js', false);
       echo $html->css('ui-lightness/jquery-ui-1.8.9.custom');

?>
  • 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-20T00:54:40+00:00Added an answer on May 20, 2026 at 12:54 am

    You’re likely missing the ui.mouse, ui.draggable, and ui.resizeable dependencies.
    http://jqueryui.com/demos/dialog/

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
Can you have submenus with the top level set to checkable in WPF? I
Can somebody point me to a resource that explains how to go about having
Can a LINQ enabled app run on a machine that only has the .NET
Can I get a 'when to use' for these and others? <% %> <%#
Can anyone recommend a good library for generating an audio file, such as mp3,
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have just tried to save a simple *.rtf file with some websites and
I have text I am displaying in SIlverlight that is coming from a CMS
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I have a Rails

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.