PDA

View Full Version : redirect



game
11-16-2012, 12:46 AM
i am trying to add a mini calendar to module on my website but was just wondering if there is a way that when they click on a specific date it will redirect to for example:


http://localhost/mywebsite/index.php?app=history&module=view&section=view&do=searchevent&date=9/12/2012


<script type="text/javascript">
window.onload = function(){
g_globalObject2 = new JsDatePick({
useMode:1,
isStripped:true,
target:"div4_example",
cellColorScheme:"beige"
});

g_globalObject2.setOnSelectedDelegate(function(){
var obj = g_globalObject2.getSelectedDay();
window.location.href = "http://www.ezineasp.net+obj.day "/" obj.month "/" obj.year";
document.getElementById("div3_example_result").innerHTML = obj.day + "/" + obj.month + "/" + obj.year;

});

};
</script>

i am using this calendar http://javascriptcalendar.org/

Beverleyh
11-16-2012, 06:29 AM
Have you tried including the correct domain and query strings in the function call?

It looks like it will work but the sample link you provided looks nothing like the window.location.href in the function.