learnt this from Path to SharePoint , let me do some summary of the step i have learnt:
- Creat the custome list with following column:
- City: text column (San Diego)
- Country_City: text column (USA_SanDiego)
- Model: choice column (0012, etc.)
- Color: choice column (dkblue, ltblue, blue, red, silver, green, magenta, etc.)
- Clock: calculated column with the following formula:
="<DIV><embed src='http://www.clocklink.com/clocks/"&Model&"-"&Color&".swf?TimeZone="&Country_City&"' width='150' height='150' wmode='transparent' type='application/x-shockwave-flash'></DIV>"
yeah!!! you are done!!
<script type="text/javascript">
//
// Text to HTML
// Feedback and questions: Christophe@PathToSharePoint.com
//
var theTDs = document.getElementsByTagName("TD");
var i=0;
var TDContent = " ";
while (i < theTDs.length) {
try {
TDContent = theTDs[i].innerText theTDs[i].textContent;
if ((TDContent.indexOf("<DIV") == 0) && (TDContent.indexOf("</DIV>") >= 0)) {
theTDs[i].innerHTML = TDContent;
}
}
catch(err){}
i=i+1;
}
//
// ExpGroupRenderData overwrites the default SharePoint function
// This part is needed for collapsed groupings
//
function ExpGroupRenderData(htmlToRender, groupName, isLoaded) {
var tbody=document.getElementById("tbod"+groupName+"_");
var wrapDiv=document.createElement("DIV");
wrapDiv.innerHTML="<TABLE><TBODY id=\"tbod"+ groupName+"_\" isLoaded=\""+isLoaded+ "\">"+htmlToRender+"</TBODY></TABLE>";
var theTBODYTDs = wrapDiv.getElementsByTagName("TD"); var j=0; var TDContent = " ";
while (j < theTBODYTDs.length) {
try {
TDContent = theTBODYTDs[j].innerText theTBODYTDs[j].textContent;
if ((TDContent.indexOf("<DIV") == 0) && (TDContent.indexOf("</DIV>") >= 0)) {
theTBODYTDs[j].innerHTML = TDContent;
}
}
catch(err){}
j=j+1;
}
tbody.parentNode.replaceChild(wrapDiv.firstChild.firstChild,tbody);
}
</script>
For the clock detail you can go to clocklink.com , check out what the country time and clock style and colour you want add to your list...then you will see it!!
Tanks to Chrisophe of this sharing !! [yeah , the world is flat]