2009-03-12 7 views

Répondre

2

je ferais quelque chose comme si en bouton clic de la fenêtre contextuelle

ClientScript.RegisterStartupScript(typeof(string), "auto_refreshparent", @" window.opener.location.reload(); ", true); 
ClientScript.RegisterStartupScript(typeof(Page), "ThatsAllFolks", "window.close();", true); 
2

Essayez quelque chose comme ceci:

parent.document.getElementById('btnSubmit').click();; // submit the parent form 
self.close(); // close the current window 
3

Vous devriez être en mesure d'appeler des fonctions dans window.parent.

<script type="text/javascript"> 
    function closeThisPopupWindow() 
    { 
     if (window.parent && window.parent.callBack) 
      window.parent.callBack(); 
     window.close(); 
    } 
</script> 

De toute évidence, vous devez attacher la fonction closeThisPopupWindow à votre bouton.

0

chaîne windowArgs = « toolbar = no, menubar = non, emplacement = non, width = 620, height = 500, scrollbars = yes , redimensionnable = oui, modal = oui "; string newWindowUrl = "MarketShotPreview.aspx"; chaîne javaScript = "\ n" + "\ n" + "\ n"; ClientScript.RegisterStartupScript (typeof (System.Web.UI.Page), "Popup", javaScript);

Questions connexes