posted 10 years ago
I have this code
but it's not working kindly help
how to set value dynamically to request attributes in Personalization through url
dojo code
==========
function handler(data){
newValue=data;
if(newValue.getDate()!
=null){
var newDay='0'+newValue.getDate();
newDay=newDay. substring(newDay.length-2, newDay.length);
var newMonth='0'+(newValue. getMonth()+1);
newMonth=newMonth. substring(newMonth.length-2, newMonth.length);
var newFullDate=newValue. getFullYear() + '-'+ newMonth + '-' + newDay;
document.getElementById(' currentDayEvents').innerHTML=" Today's Date :"+newFullDate+ "<BR>";
var dateURL='http://localhost:10039/wps/wcm/myconnect/ trainingibm/home/events/SC+ Events+61?scEventDate='+ newFullDate;
//alert( dateURL);
dojo.xhrGet({
url:dateURL,
load:function( data){
// alert(data);
alert("The message is: " + data);
document. getElementById(" currentDayEvents").InnerHTML +=data;
}
});
}else{
document. getElementById(" currentDayEvents").InnerHTML=" No Date Selected";
}
//dojo.byId("cal_2_report"). innerHTML = date;
});
});
personalization Rule
=================
Select Web Content
whose Location is TrainingIBM/Home/Events and
whose Authoring Template is TrainingIBM/Events and
whose Events.Date is greater than or equal to current Request.scEventDate
kindly guide me.