2012-05-19 3 views
0

저는 아마도 아주 잘못된 것을 말하고 있습니다.하지만 이것을 알아낼 수는 없습니다. 나는 눌렀을 때 .php 파일을 실행하고 표시하기 위해 다른 contentpane을 설정하려고하는 버튼이 있습니다. 내가 버튼을 누르면 다음은 아무것도하지 않는다 : 나는 또한 GET을 실행하는 시도Dojo : .pp 파일을 표시하도록 contentpane을 설정하십시오.

dojo.addOnLoad(
     function() { 
      dojo.connect(dojo.byId("mainPanel"), "onclick", callRecordsPressed); 
}); 

function callRecordsPressed() { 
     digit.byId("mainPanel").setContent('modules/content_panes/callrecords.php'); 
} 

을하지만이 중 아무것도하지 않습니다

: 나는 컨텐츠 구획을 정의

 function callRecordsPressed() { 
      digit.byId("mainPanel").setContent(alert(dojo.xhrGet({ 
       url: 'modules/content_panes/callrecords.php', 
       load: callRecordsCallBack, 
       error: callRecordsError 
      }))); 

     } 

     // Function that will be called when the find user button is pressed 
     function callRecordsCallBack(data, ioArgs){ 
     } 

     function callRecordsError(data, ioArgs){ 
      alert('Error when attempting load call records!'); 
     } 

 <div class="centerPanel" data-dojo-type="dijit.layout.ContentPane" 
      data-dojo-props="region: 'center'" id="mainPanel" > 

      This is the right pane 

     </div> 

나는 또한 setHref (..)를 시도했으나 효과가없는 것 같습니다. 이 작업을 수행 할 수있는 방법이 있습니까?

감사 콘텐츠 창 정말 작성된 경우

+0

은 도장에 대해 잘 모르는, 그것을 무시 ... 파이어 버그/개발자 도구에서 볼 수있는 XHR 요청은 ? –

답변

1

, 이것은 당신이 callRecordsPressed 잘못

기능() { digit.byId ("callRecordsButton")를 무엇을하고 있는지 SI.의 setContent (경고 (도장을. xhrGet ({ url : '모듈/content_panes/callrecords.php', 로드 : callRecordsCallBack, 오류 : callRecordsError }}))))));

} 

이 likt 보일 것입니다 : 당신이 내 질문은 바보 찾으면

function callRecordsPressed() { 
     digit.byId("callRecordsButton").set('href', 'modules/content_panes/callrecords.php'); 
    } 
+0

당신은 맞았지만 "dijit"대신에 "digit"을 말하고 있다는 문제가있었습니다. 당신의 대답을 수락하십시오. 고맙습니다. – FuegoFingers

+0

죄송합니다. 귀하의 질문에서 복사하여 바쁘게 바꿨습니다. –

관련 문제