2014-01-13 19 views
0

我有一個電子商務網站,其中一個對話框頁面向用戶提供購物車信息,點擊「檢出」後,我試圖抓住我的cc處理供應商的頁面並將其加載到div中。打電話來獲取div中的另一個頁面

我加載到對話框的div致電:

$('#viewCart').html('<object data="https://someCC.com/amount=<?php echo $totalCharges;?>&UMinvoice=<?php echo $_SESSION['cartId'];?>">'); 

我的問題是,該對話框中包含的頁面,但只在對話框的一小部分,因爲在這裏看到。 enter image description here

我該如何調整它,使a)對話框更大,b結果頁面適合對話框?

編輯::::

$('#viewCart').dialog(
    { 
      autoOpen:false, 
      width: 1400, 
      modal: true, 
      resizable: false, 
      closeOnEscape: true, 
      buttons: 
    { 

      "CheckOut": function() 
      { 

$('#viewCart').html('<object data="https://someCC.com/amount=<?php echo $totalCharges;?>&UMinvoice=<?php echo $_SESSION['cartId'];?>">'); 
      }, 
      "Cancel": function() 
      { 
       $(this).dialog("close"); 
      } 
    } 
    }); 

,並在頁面底部:

<div id='viewCart'></div> 
+1

這與Ajax有什麼關係? – Quentin

+0

我犯了一個錯誤,並重新命名問題,道歉。 – bart2puck

+0

發佈您的html標記,以便我們可以看到#viewCart的外觀。同時發佈包含1行的代碼,您向我們展示了完成的 – erikrunia

回答

0

需要添加屬性的對象。

$('#viewCart').html('<object width="1100' height="1100" data="https://someCC.com/amount=<?php echo $totalCharges;?>&UMinvoice=<?php echo $_SESSION['cartId'];?>">'); 
     }, 
相關問題