I have a first page. Where is a link which open jQuery Dialog with iframe with second page inside. There is a resizable textarea inside second page. Actually the textarea resizable only when I open the second page strictly without iframe, but it's not resizable inside iframe. How can it be fixed?
UPD: This is my html code from first page:
- <div id="dialog-system" title="system settings">
- <div class="loadingDivForDialog"><img src="Control/Image/loading.gif" alt="loading..." /></div>
- <iframe id="SystemFrame" src="" scrolling="no" frameborder="0"></iframe>
- </div>
* This source code was highlighted with Source Code Highlighter.
this is script to opent dialog box:
- function showSystemDialog(propertyName, id_prov, psysN开发者_JAVA技巧ame, currentItemForTick) {
- $('.loadingDivForDialog').show();
- $('#SystemFrame').hide();
-
- var defaultSrc = "Settings.aspx?pro=" + propertyName + "&id_prov=" + id_prov;
- $("#systemFrame").attr('src', String(defaultSrc));
-
- $("#dialog-system").dialog({
- resizable: false,
- height: 300,
- width: 680,
- modal: true,
- position: 'center',
- buttons: {}
- });
- $('#SystemFrame').load(function() {
- $('.loadingDivForDialog').hide();
- $('#SystemFrame').show();
- $('#SystemFrame').contents().find("input[value='Update']").click(function() {
-
- var obj = $("#" + currentItemForTick);
-
- if (obj.get(0).tagName == "INPUT") {
- obj.attr('checked', true);
- }
- else {
- obj = window.parent.$("input[value='" + psysName + "']");
-
- obj.attr("checked", true);
- }
- });
-
- $('#SystemFrame').contents().find("input[value='Cancel']").click(function() { $("#dialog-system").dialog("close") });
-
- $("#dialog-system").dialog("option", "height", parseInt($('#SystemFrame').contents().height(), 10) + 35);
- });
- return false;
- }
* This source code was highlighted with Source Code Highlighter.
this is textarea and script from the second page:
- <textarea name="ctl00$ContentPlaceHolderBody$ctrl02$fldText" rows="2" cols="20" id="ctl00_ContentPlaceHolderBody_ctrl02_fldText" class="textbox"></textarea>
-
- <script type="text/javascript">$(function() {
- $("#ctl00$ContentPlaceHolderBody$ctrl02$fldText").resizable({
- handles: "se",
- maxWidth: 340,
- minWidth: 196,
- minHeight: 18
- });
- });</script>
* This source code was highlighted with Source Code Highlighter.
UPD: Any ideas?
I'm having a similar problem with resizing when there are iframes on the page. I'm starting to come to the conclusion that the iframe is preventing the relevant mouse handlers getting through to the resize logic in jQuery.
Not strictly a solution, but it might point someone in the right direction.
UPDATE: See the last comment on this jQuery ticket for more details of a potential fix http://bugs.jqueryui.com/ticket/3176
精彩评论