Hi,
In the below javascript function, we are using
window.location.replace("/crb/web/tool_staging.php/home/showfullbooking?id="+selectdate);
We want to replace the window.location.replace by the Ajax call using
XMLHttpRequest object.
Do we have any symfony interface to achive this ?
Regards
Deepak
======================================================================================
<script type="text/javascript">
YAHOO.namespace("example.calendar");
YAHOO.example.calendar.init = function()
{
function handleSelect(type,args,obj)
{
var dates = args[0];
var date = dates[0];
var year = date[0], month = date[1], day = date[2];
var caldate = month + "/" + day + "/" + year;
calday= new Date(caldate);
var days= calday.getDay();
var weekdays=new Array(7);
weekdays[0]="Sunday";
weekdays[1]="Monday";
weekdays[2]="Tuesday";
weekdays[3]="Wednesday";
weekdays[4]="Thursday";
weekdays[5]="Friday";
weekdays[6]="Saturday";
var calmonths=new Array(7);
calmonths[0]="January";
calmonths[1]="February";
calmonths[2]="March";
calmonths[3]="April";
calmonths[4]="May";
calmonths[5]="June";
calmonths[6]="July";
calmonths[7]="August";
calmonths[8]="September";
calmonths[9]="October";
calmonths[10]="November";
calmonths[11]="December";
var months= calday.getMonth();
var txtDate1 = document.getElementById("date1");
txtDate1.innerHTML = weekdays[days] + ", " + calmonths[months] + " "
+ day + ", " + year;
if(month <10)
{
var month1="0"+month;
}
else
{
var month1= month;
}
if(day <10)
{
var day1="0"+day;
}
else
{
var day1= day;
}
var selectdate= year + "-" + month1 + "-" + day1;
window.location.replace("/crb/web/tool_staging.php/home/showfullbooking?id="+selectdate);
}
</script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---