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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:04:30+00:00 2026-06-03T00:04:30+00:00

quite random behavior, I’m calling on a modal dialog to show a partial inside.

  • 0

quite random behavior, I’m calling on a modal dialog to show a partial inside.

I’m working with simple_form + bootstrap and jquery-ui.

the button that calls the function has this code in the view:

<p><%= link_to 'New Boots', new_boot_path, :class => 'btn btn-primary pull-right', :remote => true, :id => 'new_boot_link' %></p>

in my views/boots/new the code is this:

<div id="content">
<%= render :partial => 'form' %>
</div>

and in views/boots/_form the following

<%= simple_form_for(@boot, :html => { :class => 'form-vertical' }, :remote => true) do |f| %>
<fieldset>
    <%= f.input :number %>
    <%= f.input :size, :collection => boot_size_options %>
    <%= f.input :condition, :collection => boot_condition_options %>
    <%= f.input :brand , :collection => boot_brand_options %>
</fieldset>
    <div class="form-actions">
    <%= f.button :submit, :class => 'btn btn-primary' %>
    <%= submit_tag 'Reset', :type => :reset, :class => "btn btn-danger" %>
    </div>
<% end %>

In application.js i have the following:

$(document).ready(function() {


        $('#new_boot_link').click(function(e) {
        var url = $(this).attr('href'); 
        $('#modal').dialog({
                title: "New Boots",     
                draggable: true,
                resizable: false,
                modal: true,
                width:'auto',
                open: function() {
                        return $(this).load(url + ' #content');}
        });
        });
    });

So the modal works as it should, but it appears at the bottom of the screen, however if i close it and click on the button again, it shows right in the middle as it should have done in the first place.

Is it css? I think maybe not, as otherwise it would continue showing up constantly in the same place… so i dont know if is the way I’m calling the function?

Suggestions are welcome, this is quite an annoying glitch!

  • 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-03T00:04:33+00:00Added an answer on June 3, 2026 at 12:04 am

    Sorry about previous mistakes.
    Unfortunately I can’t reproduce your problem in person. I suspect that this would help because it will convert the DIV and on call fill and display.

    $(document).ready(function(){
    var modal=$('#modal');
    $('#new_boot_link').click(function(e) {
      var url = $(this).attr('href'); 
      modal.load(url + ' #content',function(){
        modal.dialog("open");
      });
    });
    modal.dialog({ autoOpen: false, title: "New Boots", draggable: true,
    resizable: false, modal: true, width:'auto'});
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to use jquery and a multidemensional array to show a random quote
I'm working on a project that produces quite a few pdf's through Crystal Reports.
I've developed a random string generator but it's not behaving quite as I'm hoping.
Since I've never done this and the google results are quite random, I ask
This is quite strange for me, but I'm getting an unexpected and random segmentation
I am working on a static class to provide random values for my program,
I quite like being able to generate the same set of pseudo-random data repeatedly,
I want a random sound to play on a click on a button on
I like to commit quite frequently (and even randomly) when I am working on
Hi I have this basic random quote script, but I would like it 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.