本文发表在 rolia.net 枫下论坛For JS part, the code is here, which triggered by click on the div
function showImage(div)
{
var firstElement, secondElement;
var workplace, stepbox;
var todayDate, intDate, intTodayDate, nextDay;
firstElement = div.getElementsByTagName('span')[0];
secondElement = div.getElementsByTagName('span')[1];
todayDate = new Date();
intTodayDate = parseInt(todayDate.getDate());
intDate = parseInt(firstElement.innerHTML)
nextDay = new Date(todayDate.getYear(), todayDate.getMonth(), 8);
if (firstElement.innerHTML != "" )
{
var i, j;
i = document.getElementById(div.id).style.top ;
j = document.getElementById(div.id).style.left ;
workplace = document.getElementById('workplace');
workplace.style.position = "absolute";
workplace.style.top = i;
workplace.style.left = j;
//alert(workplace.firstChild.firstChild.id);
stepbox = document.getElementById('txtSteps');
stepbox.value = secondElement.innerHTML;
//txtSteps.innerText = secondElement.innerText;
workplace.style.visibility = 'visible';
stepbox.focus();
var lblname;
lblname = document.getElementById('txtlblName');
lblname.value = div.id;
}
}
in my vb.net code, under certain condition:
If DateDiff("d", thisDate, Today()) > 30 or DateDiff("d", thisDate, Today()) < 0 Then
dayDiv = page.FindControl("div" & Session("intWeekFirst")+j)
dayDiv.disabled = true
End If
Hope this is clear enough. No matter, thank you guys so much for trying to help me out. I really appreciate it.更多精彩文章及讨论,请光临枫下论坛 rolia.net
function showImage(div)
{
var firstElement, secondElement;
var workplace, stepbox;
var todayDate, intDate, intTodayDate, nextDay;
firstElement = div.getElementsByTagName('span')[0];
secondElement = div.getElementsByTagName('span')[1];
todayDate = new Date();
intTodayDate = parseInt(todayDate.getDate());
intDate = parseInt(firstElement.innerHTML)
nextDay = new Date(todayDate.getYear(), todayDate.getMonth(), 8);
if (firstElement.innerHTML != "" )
{
var i, j;
i = document.getElementById(div.id).style.top ;
j = document.getElementById(div.id).style.left ;
workplace = document.getElementById('workplace');
workplace.style.position = "absolute";
workplace.style.top = i;
workplace.style.left = j;
//alert(workplace.firstChild.firstChild.id);
stepbox = document.getElementById('txtSteps');
stepbox.value = secondElement.innerHTML;
//txtSteps.innerText = secondElement.innerText;
workplace.style.visibility = 'visible';
stepbox.focus();
var lblname;
lblname = document.getElementById('txtlblName');
lblname.value = div.id;
}
}
in my vb.net code, under certain condition:
If DateDiff("d", thisDate, Today()) > 30 or DateDiff("d", thisDate, Today()) < 0 Then
dayDiv = page.FindControl("div" & Session("intWeekFirst")+j)
dayDiv.disabled = true
End If
Hope this is clear enough. No matter, thank you guys so much for trying to help me out. I really appreciate it.更多精彩文章及讨论,请光临枫下论坛 rolia.net