<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
// alert($('#hdnnode').val());
alert(localStorage.getItem("TreeNode"));
if (localStorage.getItem("TreeNode") != null)
{
$('#IPFrame').attr('src', localStorage.getItem("TreeNode"));
// localStorage.removeItem("TreeNode");l
alert(localStorage.getItem("TreeNode"));
}
else
{
var defaultFrameUrl = $('#tvDocumentLibraryt0').attr('href');
// var defaultFrameUrl = $('#ctl00_ctl39_g_5ee41523_d303_442b_88b9_c64700cd7030_ctl00_tvDocumentLibraryt0').attr('href');
$('#IPFrame').attr('src', defaultFrameUrl);
// Initialization code here, meant to run once.
localStorage.removeItem("TreeNode");
alert(localStorage.getItem("TreeNode"));
}
$('a').click(function (e) {
var linkID = $(this).attr("id");
if (linkID == 'zz11_SiteActionsMenu')
{
//alert(linkID);
// alert('sietsetings');
// e.preventDefault();
// e.stopPropagation();
}
//else if (linkID == 'zz13_NewMenu_t')
//{
// alert('Ram');
// }
else {
var imgSrcVal = $('img', this).attr("src");
if (imgSrcVal != undefined) {
var n = imgSrcVal.indexOf("folder");
if (n != -1) {
e.preventDefault();
localStorage.setItem("name", $(this).attr('href'));
$('#IPFrame').attr('src', $(this).attr('href'));
}
else {
e.stopPropagation();
}
}
else {
if (linkID != null && imgSrcVal == undefined) {
e.preventDefault();
localStorage.setItem("TreeNode", $(this).attr('href'));
$('#IPFrame').attr('src', $(this).attr('href'));
}
}
}
// alert('End');
// e.stopPropagation();
});
});
<%-- function GetSelectedNode() {
var treeViewData = window["<%=tvDocumentLibraryt0.ClientID%>" + "_Data"];
if (treeViewData.selectedNodeID.value != "") {
var selectedNode = document.getElementById(treeViewData.selectedNodeID.value);
var value = selectedNode.href.substring(selectedNode.href.indexOf(",") + 3, selectedNode.href.length - 2);
var text = selectedNode.innerHTML;
alert("Text: " + text + "\r\n" + "Value: " + value);
} else {
alert("No node selected.")
}
return false;
}--%>
</script>
<script type="text/javascript">
$(document).ready(function () {
// alert($('#hdnnode').val());
alert(localStorage.getItem("TreeNode"));
if (localStorage.getItem("TreeNode") != null)
{
$('#IPFrame').attr('src', localStorage.getItem("TreeNode"));
// localStorage.removeItem("TreeNode");l
alert(localStorage.getItem("TreeNode"));
}
else
{
var defaultFrameUrl = $('#tvDocumentLibraryt0').attr('href');
// var defaultFrameUrl = $('#ctl00_ctl39_g_5ee41523_d303_442b_88b9_c64700cd7030_ctl00_tvDocumentLibraryt0').attr('href');
$('#IPFrame').attr('src', defaultFrameUrl);
// Initialization code here, meant to run once.
localStorage.removeItem("TreeNode");
alert(localStorage.getItem("TreeNode"));
}
$('a').click(function (e) {
var linkID = $(this).attr("id");
if (linkID == 'zz11_SiteActionsMenu')
{
//alert(linkID);
// alert('sietsetings');
// e.preventDefault();
// e.stopPropagation();
}
//else if (linkID == 'zz13_NewMenu_t')
//{
// alert('Ram');
// }
else {
var imgSrcVal = $('img', this).attr("src");
if (imgSrcVal != undefined) {
var n = imgSrcVal.indexOf("folder");
if (n != -1) {
e.preventDefault();
localStorage.setItem("name", $(this).attr('href'));
$('#IPFrame').attr('src', $(this).attr('href'));
}
else {
e.stopPropagation();
}
}
else {
if (linkID != null && imgSrcVal == undefined) {
e.preventDefault();
localStorage.setItem("TreeNode", $(this).attr('href'));
$('#IPFrame').attr('src', $(this).attr('href'));
}
}
}
// alert('End');
// e.stopPropagation();
});
});
<%-- function GetSelectedNode() {
var treeViewData = window["<%=tvDocumentLibraryt0.ClientID%>" + "_Data"];
if (treeViewData.selectedNodeID.value != "") {
var selectedNode = document.getElementById(treeViewData.selectedNodeID.value);
var value = selectedNode.href.substring(selectedNode.href.indexOf(",") + 3, selectedNode.href.length - 2);
var text = selectedNode.innerHTML;
alert("Text: " + text + "\r\n" + "Value: " + value);
} else {
alert("No node selected.")
}
return false;
}--%>
</script>
No comments:
Post a Comment