Tuesday, January 3, 2012

JavaScript Code to get the logged user value.

<Table width='100%'>
<Tr>
<Td id='tdLoginUser'>
</Td>
</Tr>
</Table>
<script language="javascript" type="text/javascript">
var strTable="";
strTable+="<Table width='100%'>";
strTable+="<Tr>";
strTable+="<Td>";
var strUserName=document.getElementById('zz8_Menu').innerText;
strUserName=strUserName.substring(8,strUserName.length);
strTable+=strUserName;
strTable+="</Td>";
strTable+="</Tr>";
strTable+="</Table>";
document.getElementById('tdLoginUser').innerHTML=strTable;
</script>

No comments:

Post a Comment