English 中文(简体)
履历: 履历
原标题:Callback Function not Working: Jquery .load()
  • 时间:2011-11-05 17:39:09
  •  标签:
  • jquery

EDIT:我有一个问题,利用Iframe Modal Box的舱位,在母页上重载一粒。

在母体网页上什么?

Iframe 模式箱上的东西是什么? 表格上填上了文件页,我在该网页上做了所有更新。 在所有这些更新工作完成之后,我关闭模式箱和修复干 the的职能在机内完成。

我的守则如下:

$(document).ready(function() {
    $( #hidden ).load( getcontent.php );
    parent.$.fallr( hide , function(){
    });
});

我预计,这部法典将)在母子上,并(b) cl上我的模式箱。 到目前为止,示范箱完全关闭! 删除第(4)条并不

最佳回答

在你的召回职能范围内,你又创造了另一个功能,但你却没有这样做。 它被制造和抛弃。 如果你取消最中层的职能,我会认为你的工作负荷更好:

parent.$.fallr( hide , function(){
     $( #hidden ).load(
          admin/getcontent.php , 
         { pageID : "<? echo $_REQUEST[ pageID ]; ?>" }
     );
});

可能也未能解决 que问题。 不能确定它是否能够适当制定这种编码。 但是,如果你将其放在数据参数上,它就应当这样做。 见上文。

因此,我们现在可以更清晰地解释,立即取消额外职能和争.(后者可能做任何事情的罚款)。

With the current code you re asking the #hidden div on the dialog to load content. But there is no #hidden div on the dialog, it s on the parent. Prefixing with parent. would fix that, but we also have another issue. We re telling the dialog to refresh the div as soon as the dialog loads. That s not what we want. We want it to refresh when we re closing the dialog, right? So moving it into the fallr callback should fix that. And that should run in the context of the parent, so no parent. prefix required.

$(document).ready(function() {
    parent.$.fallr( hide , function(){
        $( #hidden ).load( getcontent.php );
    });
});

但是,这比我们以前多或少造成了问题,而现在的情况并非如此。

因此,对我来说,问题是,你试图与孩子的父母做事。 我认为,父母应当做事。 因此,如果诊断书准备关闭,它就应当把一项功能传给父母,以关闭诊断书并更新其功能:

//From an event on the dialog
parent.closeDialogAndRefresh();

//On the parent define it
function closeDialogAndRefresh() {
    $.fallr( hide );
    $( #hidden ).load( getcontent.php );
}

如果做不到工作的话。 开始一个时间,在50万ms之后或像50万这样的东西之后,将叫近DialogAndrefresh。

The real problem here I think is that you re using IFrames instead of floating divs from some decent UI-framework. Hope you ll get where you re going though.

问题回答

页: 1 在那里:

parent.$.fallr( hide , function(){
   function(){




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签