I am probably doing something very wrong and noobish but I can’t seem to figure this out. I have a button that, when pressed, I want to set a different contentpane to run and display a .php file. The following does nothing when I press the button:
dojo.addOnLoad(
function() {
dojo.connect(dojo.byId("mainPanel"), "onclick", callRecordsPressed);
});
function callRecordsPressed() {
digit.byId("mainPanel").setContent('modules/content_panes/callrecords.php');
}
I have also tried running a get but this doesn’t do anything either:
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!');
}
Where I define the content pane:
<div class="centerPanel" data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region: 'center'" id="mainPanel" >
This is the right pane
</div>
I have also tried setHref(..) and that didn’t seem to have an effect either. Is there a set way to do this?
Thanks
if your content pane has really been created, this si what you are doing wrong
function callRecordsPressed() {
digit.byId(“callRecordsButton”).setContent(alert(dojo.xhrGet({
url: ‘modules/content_panes/callrecords.php’,
load: callRecordsCallBack,
error: callRecordsError
})));
should look likt this: