Reputation: 889
I have been having an issue with the positioning of a dialog box.
I am using classic ASP or VBScript along with jquery-ui-1.10.2 and jquery-1.9.1.js
My dialog box is working just fine except for the positioning. It seems to be stuck in the top left corner of the page regardless of what I change. I have added a position, set center = true, tried to modify the styling, and other little tweaks but nothing seems to work. I am at a loss here and was wondering if anyone else has run into a similar issue, thanks.
When I downloaded JQuery UI I made sure everything was checked.
HTML:
<table cellpadding="0" cellspacing="0">
<td id="Comments" height="39" colspan="1">
</td>
</table>
<div id="dialog-message" title="Important information">
<p style="text-align:center;"> Message regarding this content </p>
<br/>
<div style="margin-left: 23px;">
<p>Subject: <input type="text" id="subject" />
<br/> <br/>
Body: <input type="text" id="question" />
</div>
</div>
Jquery:
$(document).ready(function() {
$("#dialog-message").hide()
}
);
$("#Comments").click(function() {
$("#dialog-message").dialog({
modal: true,
width: 400,
height: 500,
}
}
});
});
Upvotes: 0
Views: 780
Reputation: 4015
Cleaning up the code solves the problem:
$(document).ready(function() {
$("#dialog-message").hide();
$("#Comments").click(function() {
$("#dialog-message").dialog({
modal: true,
width: 400,
height: 500
});
});
});
Here's a working jsfiddle
Upvotes: 1