HTML table inside jQuery dialog box positioning

I've created a dialog box with a ajax load call inside the dialog box. I'm trying to place a html table inside the dialog box, but when i load the page, the html table appears way down below where it should be, which is at the top of the page. How can I get the HTML table to show at the top of the dialog?

$("#subscribe").button().on( "click", function() { $( "<div id='subscription_d' title='Please Enter Your Details'></div>" ).dialog({ width:400, height:250, autoOpen: true, resizable: true, modal: true, open: function(event, ui) { $('#subscription_d').load("ajax.php?action=subscribe_form", function (){ $(this).find('button').button(); }); }, }); });

This then calls the ajax.php file, and the code for that is:

<?php switch ($_GET['action']){ case 'subscribe_form': $html = ''; $html .= '<form id="formsignup"> <table border="1"> <tr> <td>(something here)</td> </tr> </table> </form>'; echo $html; break; default: } ?>

-------------Problems Reply------------

try the dialogClass and position parameter , if you haven't.

$( "<div id='subscription_d' class='mydialog' title='please Enter Your Details'></div>" )
autoOpen: true,
dialogClass: "mydialog",
position: { my: "left top+50 " , of :"#subscribe" },
open: function(event, ui) {

$('#subscription_d').load("ajax.php?action=subscribe_form", function(){

.mydialog {
border : 1px solid #555;
float : left;
z-index: 10;

Category:php Views:4 Time:2019-02-07

Related post

  • Why is the content shown inside jQuery Dialog Box sort of cramped? 2010-11-21

    $(document).ready(function() { $('.something').each(function() { var $link = $(this); $ { var $dialog = $('<div></div>') .load($link.attr('href')) .dialog({ autoOpen: false, title: "Edit Book", width: 'auto', height:

  • textArea inside jquery dialog box 2014-09-26

    How can i create a text area inside a dialog box and that text area should be mandatory field created using jQuery UI. Below is the code through which i am creating submit and close buttons on the dialog box, but could not able to create text area wh

  • Html code inside jquery dialog 2011-07-18

    how can I load HTML code in separated HTML file into dialog in another file. when I click into anchor in one.html page, dialog appears containing HTML code exist in another HTML page. I didn't make the code that appear in the dialog in the same page,

  • How to close a jquery dialog box when a submit button is clicked(Submit button is residing inside the dialog box) 2012-03-28

    i have struts2 form inside a jquery dialog box, when i submit my form inside that dialog box my Struts2 action is performing but that pop up jquery dialog box is not closing. How can i close that dialog box when![enter image description here][1] i su

  • how to display jquery numeric keypad inside a dialog box? 2013-10-29

    Hi I have a numeric keypad downloaded from the link . Now I have a dialog box and I want to display the keypad when we click the text box inside the dialog box . Thanks in Advance <script type="text/javascrip

  • Change the position of a jquery dialog box after it loads 2010-10-26

    I have a jquery dialog box that loads with an image and auto resizes to the image. This is what I want. However, the box is rendered at the center position, but the image isnt fully loaded yet, there is a delay in getting the image. So when the image

  • How do I activate jquery dialog boxes returned inside the tabs widget generated by an ajax datepicker event? 2011-04-04

    There must be a simple solution that evades me. However I am very new to jquery so I am sure that is part of the issue. I have a datepicker instance which submits a date via ajax and has xhtml returned via the tabs widget. I am trying to create dialo

  • refresh an image inside a jquery dialog box 2010-02-11

    I have a jquery dialog box that opens by means of a link. I would like it so that everytime I open the dialog box the image is refreshed. I tried something like this: function open_dialog() { $("#imageThumbBox").dialog('destroy'); $("#imageThumbBox")

  • Remove data from JQuery dialog box when I close it 2012-01-23

    I have JQuery dialog box for inserting new row in table. And everything works good. Few days ago when I inserted FlexiGrid for Table started a problem for me. When I insert new row dialog dissapear but when I open dialog for new insert data that is i

  • Update gridview that is inside jquery dialog ( c#) 2012-04-20

    Is there a way to update the gridview that is inside a jquery dialog box? I have got the buttons functioning, however the gridview is not updating. Below is my code. JS: <script type="text/javascript" language="javascript"> $(document).ready(fu

  • Help with pregreplace and uniqid for jquery dialog boxes 2010-04-11

    First of all, do not be overwhelmed by the long code, I just put it for reference...I have a function that runs preg_replace on each comment users post and puts matches in a jquery dialog box with a matching open-link. For example, if there is a para

  • Need transfer effect with jquery dialog box open & close 2011-10-21

    i was looking for jquery dialog box open/close with transfer effect. i found one from this site and it is working. but it is not working the way i want. here is code JQuery snippet --------------- $("#PMinfo").dialog({ autoOpen: true, height: 250, wi

  • Focus not coming on flash object while loading dynamically inside a dialog box? 2012-01-04

    Today i have done a work where i was supposed to show a flash player inside a dialog box. Which i was able to do it quite easily.But my flash player contains a text box which needs to be focused once the flash player is loaded inside the dialog box,

  • Send ajax request to a file inside Jquery Dialog 2012-03-03

    I am trying to send an ajax request to a page that is loaded inside the Jquery Dialog box. This is my dialog box code: $('#dialog').dialog({ modal: false, open: function () { $(this).load('window.php'); }, height: 240, width: 400, title: 'Ajax Page'

  • Centering a JQuery Dialog Box 2009-08-28

    I have a JQuery dialog box that is set to position: 'center' Now I run a database query and return a long list of records, and each record has an "edit" button. If I scroll down the page and click the edit button for the record jquery pops open my di

  • Rich text editor in JQuery dialog box 2010-01-27

    I'm trying to get a rich text editor in a jquery dialog box. I'm currenty trying tiny mce. When I don't initialize tiny mce the text area displays the text with the HTML characters. When I do initialize tiny mce nothing is displayed in the text area.

  • Detect if a JQuery dialog box is open 2010-07-22

    I am using a JQuery dialog field. If it is open, I want to do one thing. If it is closed, I want to do another. My question is, how do I detect if a JQuery dialog box is open or not? Thank you, --------------Solutions------------- If you read the doc

  • trouble invoking a Jquery dialog box on a 'parent' page 2010-09-27

    I am having a trouble invoking a Jquery dialog box on a 'parent' page. I'm calling the dialog 'open' from a dynamically loaded page within an iFrame on the 'parent' page. The showDialog button is on that dynamic IFrame form. I'm using #divId as the p

  • Why isn't my jquery dialog box working? 2010-10-12

    I've been trying to figure out how to get a jquery dialog box to work. For the life of me, I can't get it to work. Here is some html with in-line javascript I've written: <html> <head> <script type="text/javascript" src="jquery.js">

  • Deleting a row from dynamic html table using jquery 2010-11-09

    I have saved few data from the view to database and added it to dynamically created html table using jquery in my mvc application. The script is given below. $(document).ready(function() { var attributetable = []; $("#AddAttrib").click(functi

  • how to put a logo in a jquery dialog box 2011-04-13

    I want to put a logo in a jquery dialog box at left side of the title window(e.g mozilla firefox logo in FF). How can it be achieved? --------------Solutions------------- Something like this, $("#dialogHolder").dialog({ maxHeight : 'auto', width : 'a

  • How to call JQuery dialog box using link button in 2011-05-01

    I have a Jquery dialog box in my website. This dialog box is meant for getting user comments. At present, I'm using the following code to execute the Javascript function and is working fine: **<a href="#dialog" name="modal">Rate this</a>*

  • Javascript executes more than once inside jquery dialog 2011-05-12

    i'm trying to use javascript code inside "jquery dialog" and my code executes more than once. Simple example.. <div id='dialog'> <script type="text/javascript"> $(document).ready(function () { console.log('inside'); }); </script>

  • How to avoid scroll bar in all browsers while a jQuery Dialog box is showing? 2011-05-16

    I have a page where when we click a button a Jquery dialog box is called using JQuery. But when it is shown the Window scroll bar is shown in all browsers. How can we avoid this? Can we avoid this uising JQuery? Or is it is better to fix by CSS?. ---

Copyright (C), All Rights Reserved.

processed in 0.106 (s). 11 q(s)