Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

page with JavaScript not working when placed within a html frame.

Posted on 2005-05-04
5
Medium Priority
?
867 Views
Last Modified: 2008-01-09
Hello Experts,
 
We have a web application that we need to include within our Intranet portal.  The application was coded in .NET, but on the HTML-side, there are a lot of JavaScript function calls.
 
The application is a 3rd party app, and it has to be used as it is, out of the box.  I have the source code so I can make code modifications if necessary. The application front-end was placed within an I-Frame, and it stops working after logging in.
 
The JavaScript functions, (all of them) blow up.  So the page is useless when encapsulated within any frame.  My basic understanding of JavaScript tells me that the JavaScript, as it is coded assumes the page that it is functioning within is the "parent" object, and as soon as the page was placed within the frame, the object model changed, so the JavaScript will not work.  The problem is, that I am weak on JavaScript, and I need an example as to how I will go about modifying the functions so they will work within the frameset.
 
For example, let's say that the page in question is called "navigation.aspx", and I pull that page into a html frame called "testframe.htm"
 
How would I modify the JavaScript function so that it will work?  As an example, I included the JavaScript from one of the actual pages that isn’t working (I'm not expecting someone to fix the entire script, i'm only looking for an example on one of the functions, but I didn't know how much or how little I should include...):

// Header global variables - initial view
var gl = getGlobals();
if (gl.showFolders == undefined)
      gl.showFolders = true;
if (gl.navFrameShown == undefined)
      gl.navFrameShown = true;
if (gl.supplementalFrameShown == undefined)
      gl.supplementalFrameShown = false;

setInitialView();

function handleProperties()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode != -1)) {
            if (g.nav_selectednode == 0) {
                  alert("<%= this.EncodeJS("IDS_PROPERTIES_ERROR_ROOT_FOLDER", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == "<%= WebDesktop.Utils.Constants.ID_CORPORATE_CATEGORIES %>") {
                  alert("<%= this.EncodeJS("IDS_PROPERTIES_ERROR_CORPORATE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.rootCategoryId.value) {
                  alert("<%= this.EncodeJS("IDS_PROPERTIES_ERROR_PERSONAL_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  showInWorkspace("properties.aspx?id=" + g.nav_selectednode);
            }      
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

function handleMove()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode > 0)) {
            if (g.nav_selectednode == document.Form1.favoritesFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_FAVORITES", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.inboxFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_INBOX", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.rootCategoryId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_PERSONAL_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == "<%= WebDesktop.Utils.Constants.ID_CORPORATE_CATEGORIES %>") {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_CORPORATE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  showInWorkspace("organize.aspx?command=move&refreshnav=1&itemid=" + g.nav_selectednode + "&categories=" + !g.showFolders);
            }
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

function handleCopy()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode > 0)) {
            if (g.nav_selectednode == document.Form1.favoritesFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_COPY_FAVORITES", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.inboxFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_COPY_INBOX", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  showInWorkspace("organize.aspx?command=copy&refreshnav=1&itemid=" + g.nav_selectednode + "&categories=false");
            }
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

function handleDelete()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode > 0)) {
            if (g.nav_selectednode == document.Form1.favoritesFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_FAVORITES", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.inboxFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_INBOX", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.rootCategoryId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_PERSONAL_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == "<%= WebDesktop.Utils.Constants.ID_CORPORATE_CATEGORIES %>") {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_CORPORATE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  var confirmString = "";
                  if (g.showFolders) {
                        confirmString = "<%= this.EncodeJS("IDS_LISTING_CONFIRM_DELETE_FOLDER", WebDesktop.Utils.Constants.RM_GENERAL) %>";
                  } else {
                        confirmString = "<%= this.EncodeJS("IDS_LISTING_CONFIRM_DELETE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>";
                  }
                  if (confirm(confirmString)) {
                        navhiddenframe.document.location = "delete.aspx?refreshnav=1&showlisting=1&ids=" + g.nav_selectednode;
                  }
            }
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

var foldersTitle = "<%= this.EncodeJS("IDS_NAV_FOLDERS", WebDesktop.Utils.Constants.RM_GENERAL) %>";
var foldersImg = "CeImages/folder.gif";
function displayFolders()
{
      var g = getGlobals();
      btnFolders.check(true, false);
      btnCopy.setDisplay(true);
      onToggleFoldersCategories(true, g.nav_folderId);
      setNavTitle(foldersTitle, foldersImg);

      g.listing_parentid = g.nav_folderId;
      g.listing_issearch = 'false';
      g.listing_advancedsearch = "";
      g.nav_selectednode = g.nav_folderId;
      g.page_number = 1;
      showListing();
}

var categoriesTitle = "<%= this.EncodeJS("IDS_NAV_CATEGORIES", WebDesktop.Utils.Constants.RM_GENERAL) %>";
var categoriesImg = "CeImages/categories.gif";
function displayCategories()
{
      var g = getGlobals();
      btnCategories.check(true, false);
      btnCopy.setDisplay(false);
      onToggleFoldersCategories(false, g.nav_categoryId);
      setNavTitle(categoriesTitle, categoriesImg);

      g.listing_parentid = g.nav_categoryId;
      g.listing_issearch = 'false';
      g.listing_advancedsearch = "";
      g.nav_selectednode = g.nav_categoryId;
      g.page_number = 1;
      showListing();
}

function onToggleFoldersCategories(bShow, id)
{
      var g = getGlobals();
      if(g == null)
            return;

      if (bShow != undefined)
            g.showFolders = bShow;
      else
            g.showFolders = !g.showFolders;

      var queryStr = "";
      if (id != undefined) {
            queryStr = "?id=" + id;
      }
      
      if (!g.showFolders) {
            queryStr += (queryStr.length == 0) ? "?" : "&";
            queryStr += "categories=true";
      }
      
      var navigationBodyFrame = findFrame('navigationBodyFrame');
      navigationBodyFrame.location = "<%= Request.ApplicationPath %>/navigationBody.aspx" + queryStr;
      
      var headerPlusFrame = getHeaderPlus();
      headerPlusFrame.onToggleFoldersCategories(g.showFolders);
      g.nav_selectednode = -1;
}

function setNavTitle(titleText, imgSrc)
{
      var span = document.getElementById('navTitle');
      if (span && span.innerHTML) {
            span.innerHTML = titleText;
      }
      var img = document.getElementById('navTitleImage');
      if (img && img.src) {
            img.src = imgSrc;
      }
}

function handleTempRefreshSelNode()
{
      refreshEntireNavTree();
}

var btnFolders = newIconRadioWidget ("btnFolders","images/folder.gif",displayFolders,null, "<%= this.EncodeJS("IDS_NAV_SHOWFOLDERS", WebDesktop.Utils.Constants.RM_GENERAL) %>","grpToggleNav", 16,16,3,3,25,3);
var btnCategories = newIconRadioWidget("btnCategories", "images/categories.gif",displayCategories, null,"<%= this.EncodeJS("IDS_NAV_SHOWCATEGORIES", WebDesktop.Utils.Constants.RM_GENERAL) %>","grpToggleNav",16,16,3,3,25,3);

var btnRefresh = newIconWidget("btnRefresh","images/refresh.gif",handleTempRefreshSelNode,null,"<%= this.EncodeJS("IDS_NAV_REFRESH", WebDesktop.Utils.Constants.RM_GENERAL) %>",16,16,3,3,25,3);
var btnProperties = newIconWidget("btnProperties", "images/properties.gif", handleProperties,null, "<%= this.EncodeJS("IDS_NAV_PROPERTIES", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);
var btnMove = newIconWidget("btnMove", "images/move_folder.gif", handleMove, null, "<%= this.EncodeJS("IDS_NAV_MOVE", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);
var btnCopy = newIconWidget("btnCopy", "images/copy_folder.gif", handleCopy, null, "<%= this.EncodeJS("IDS_NAV_COPY", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);
var btnDelete = newIconWidget("btnDelete", "images/delete.gif", handleDelete,null, "<%= this.EncodeJS("IDS_NAV_DELETE", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);

var toolbarContainer = newPaletteContainerWidget("toolbarContainer",null,0);      // Required
var toolbar = newPaletteWidget("toolbar");
toolbarContainer.add (toolbar);
toolbar.add (btnFolders);
toolbar.add (btnCategories);
toolbar.add (btnRefresh);
toolbar.add (btnProperties);
toolbar.add (btnMove);
toolbar.add (btnCopy);
toolbar.add (btnDelete);

function loadCB()
{
      toolbarContainer.init();
      toolbar.init();
      btnFolders.init();
      btnCategories.init();
      btnRefresh.init();
      btnProperties.init();
      btnMove.init();
      btnCopy.init();
      btnDelete.init();

      if (getGlobals().showFolders) {
            btnFolders.check(true,true);
      } else {
            btnCategories.check(true, true);
            btnCopy.setDisplay(false);
            setNavTitle(categoriesTitle, categoriesImg);
      }
      
      applyRights();
}      

var collapseImg = new Image();
collapseImg.src = "images/panel/arrow_left.gif";
var collapseImgOver = new Image();
collapseImgOver.src = "images/panel/arrow_left_hover.gif";

                  </script>

Expert Input is greatly appreciated!

Chad
0
Comment
Question by:cfetzer
5 Comments
 
LVL 25

Expert Comment

by:archrajan
ID: 13931108
please post a link to the page or the view source..
thats easier to debug
0
 
LVL 12

Accepted Solution

by:
GoofyDawg earned 1000 total points
ID: 13931509
What about saving the Javascript code in a file (like functions.js) that you include in the page that's brought up in the IFrame. That way it operates at the same level as the page being loaded, and you don't have to do a bunch of referencing. The way the code looks, it seems to be referencing objects and variables at the same level as the page, so doing something like:

<html>
<head>
<script language="JavaScript" src="myFunctions.js"></script>
</head>

Might do the trick. If this is already the case, like archrajan mentioned, a link to the page or view source would be good.

GoofyDawg
0
 
LVL 1

Author Comment

by:cfetzer
ID: 13936348
The page is internal, so here is the source:

<%@ Page CodeBehind="navigationHeader.aspx.cs" Language="c#" AutoEventWireup="false" Inherits="WebDesktop.navigationHeader" %>
<HTML>
      <HEAD>
            <title runat="server" id="PageTitle"></title>
            <link runat="server" id="StyleSheetLink" type="text/css" rel="stylesheet"></link>
            <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
            <meta content="C#" name="CODE_LANGUAGE">
            <meta content="JavaScript" name="vs_defaultClientScript">
            <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
            <script language="javascript" src="dhtmllib/dom.js"></script>
            <script language="javascript" src="dhtmllib/palette.js"></script>
            <script language="javascript" src="dhtmllib/menu.js"></script>
            <script language="javascript" src="Utils/utils.js"></script>
            <script language="javascript">
            // must be called in the header
            initDom("dhtmllib/images/skin_standard/","<asp:Literal id='language' runat='server'></asp:Literal>");
            styleSheet();
            </script>
      </HEAD>
      <BODY onload="loadCB()" scroll="no">
            <form id="Form1" runat="server">
                  <input type="hidden" id="favoritesFolderId" name="favoritesFolderId" runat="server" value="-2">
                  <input type="hidden" id="inboxFolderId" name="inboxFolderId" runat="server" value="-3">
                  <input type="hidden" id="rootCategoryId" name="rootCategoryId" runat="server" value="-4">
                  <script language="javascript">

// Header global variables - initial view
var gl = getGlobals();
if (gl.showFolders == undefined)
      gl.showFolders = true;
if (gl.navFrameShown == undefined)
      gl.navFrameShown = true;
if (gl.supplementalFrameShown == undefined)
      gl.supplementalFrameShown = false;

setInitialView();

function handleProperties()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode != -1)) {
            if (g.nav_selectednode == 0) {
                  alert("<%= this.EncodeJS("IDS_PROPERTIES_ERROR_ROOT_FOLDER", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == "<%= WebDesktop.Utils.Constants.ID_CORPORATE_CATEGORIES %>") {
                  alert("<%= this.EncodeJS("IDS_PROPERTIES_ERROR_CORPORATE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.rootCategoryId.value) {
                  alert("<%= this.EncodeJS("IDS_PROPERTIES_ERROR_PERSONAL_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  showInWorkspace("properties.aspx?id=" + g.nav_selectednode);
            }      
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

function handleMove()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode > 0)) {
            if (g.nav_selectednode == document.Form1.favoritesFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_FAVORITES", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.inboxFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_INBOX", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.rootCategoryId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_PERSONAL_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == "<%= WebDesktop.Utils.Constants.ID_CORPORATE_CATEGORIES %>") {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_MOVE_CORPORATE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  showInWorkspace("organize.aspx?command=move&refreshnav=1&itemid=" + g.nav_selectednode + "&categories=" + !g.showFolders);
            }
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

function handleCopy()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode > 0)) {
            if (g.nav_selectednode == document.Form1.favoritesFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_COPY_FAVORITES", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.inboxFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_COPY_INBOX", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  showInWorkspace("organize.aspx?command=copy&refreshnav=1&itemid=" + g.nav_selectednode + "&categories=false");
            }
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

function handleDelete()
{
      var g = getGlobals();
      if ((g.nav_selectednode != null) && (g.nav_selectednode.length > 0) && (g.nav_selectednode > 0)) {
            if (g.nav_selectednode == document.Form1.favoritesFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_FAVORITES", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.inboxFolderId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_INBOX", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == document.Form1.rootCategoryId.value) {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_PERSONAL_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else if (g.nav_selectednode == "<%= WebDesktop.Utils.Constants.ID_CORPORATE_CATEGORIES %>") {
                  alert("<%= this.EncodeJS("IDS_ORGANIZE_ERROR_DELETE_CORPORATE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>");
            } else {
                  var confirmString = "";
                  if (g.showFolders) {
                        confirmString = "<%= this.EncodeJS("IDS_LISTING_CONFIRM_DELETE_FOLDER", WebDesktop.Utils.Constants.RM_GENERAL) %>";
                  } else {
                        confirmString = "<%= this.EncodeJS("IDS_LISTING_CONFIRM_DELETE_CATEGORY", WebDesktop.Utils.Constants.RM_GENERAL) %>";
                  }
                  if (confirm(confirmString)) {
                        navhiddenframe.document.location = "delete.aspx?refreshnav=1&showlisting=1&ids=" + g.nav_selectednode;
                  }
            }
      } else {
            alert("<%= this.EncodeJS("IDS_LISTING_SELECT_ITEM_FIRST", WebDesktop.Utils.Constants.RM_GENERAL) %>");
      }
}

var foldersTitle = "<%= this.EncodeJS("IDS_NAV_FOLDERS", WebDesktop.Utils.Constants.RM_GENERAL) %>";
var foldersImg = "CeImages/folder.gif";
function displayFolders()
{
      var g = getGlobals();
      btnFolders.check(true, false);
      btnCopy.setDisplay(true);
      onToggleFoldersCategories(true, g.nav_folderId);
      setNavTitle(foldersTitle, foldersImg);

      g.listing_parentid = g.nav_folderId;
      g.listing_issearch = 'false';
      g.listing_advancedsearch = "";
      g.nav_selectednode = g.nav_folderId;
      g.page_number = 1;
      showListing();
}

var categoriesTitle = "<%= this.EncodeJS("IDS_NAV_CATEGORIES", WebDesktop.Utils.Constants.RM_GENERAL) %>";
var categoriesImg = "CeImages/categories.gif";
function displayCategories()
{
      var g = getGlobals();
      btnCategories.check(true, false);
      btnCopy.setDisplay(false);
      onToggleFoldersCategories(false, g.nav_categoryId);
      setNavTitle(categoriesTitle, categoriesImg);

      g.listing_parentid = g.nav_categoryId;
      g.listing_issearch = 'false';
      g.listing_advancedsearch = "";
      g.nav_selectednode = g.nav_categoryId;
      g.page_number = 1;
      showListing();
}

function onToggleFoldersCategories(bShow, id)
{
      var g = getGlobals();
      if(g == null)
            return;

      if (bShow != undefined)
            g.showFolders = bShow;
      else
            g.showFolders = !g.showFolders;

      var queryStr = "";
      if (id != undefined) {
            queryStr = "?id=" + id;
      }
      
      if (!g.showFolders) {
            queryStr += (queryStr.length == 0) ? "?" : "&";
            queryStr += "categories=true";
      }
      
      var navigationBodyFrame = findFrame('navigationBodyFrame');
      navigationBodyFrame.location = "<%= Request.ApplicationPath %>/navigationBody.aspx" + queryStr;
      
      var headerPlusFrame = getHeaderPlus();
      headerPlusFrame.onToggleFoldersCategories(g.showFolders);
      g.nav_selectednode = -1;
}

function setNavTitle(titleText, imgSrc)
{
      var span = document.getElementById('navTitle');
      if (span && span.innerHTML) {
            span.innerHTML = titleText;
      }
      var img = document.getElementById('navTitleImage');
      if (img && img.src) {
            img.src = imgSrc;
      }
}

function handleTempRefreshSelNode()
{
      refreshEntireNavTree();
}

var btnFolders = newIconRadioWidget ("btnFolders","images/folder.gif",displayFolders,null, "<%= this.EncodeJS("IDS_NAV_SHOWFOLDERS", WebDesktop.Utils.Constants.RM_GENERAL) %>","grpToggleNav", 16,16,3,3,25,3);
var btnCategories = newIconRadioWidget("btnCategories", "images/categories.gif",displayCategories, null,"<%= this.EncodeJS("IDS_NAV_SHOWCATEGORIES", WebDesktop.Utils.Constants.RM_GENERAL) %>","grpToggleNav",16,16,3,3,25,3);

var btnRefresh = newIconWidget("btnRefresh","images/refresh.gif",handleTempRefreshSelNode,null,"<%= this.EncodeJS("IDS_NAV_REFRESH", WebDesktop.Utils.Constants.RM_GENERAL) %>",16,16,3,3,25,3);
var btnProperties = newIconWidget("btnProperties", "images/properties.gif", handleProperties,null, "<%= this.EncodeJS("IDS_NAV_PROPERTIES", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);
var btnMove = newIconWidget("btnMove", "images/move_folder.gif", handleMove, null, "<%= this.EncodeJS("IDS_NAV_MOVE", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);
var btnCopy = newIconWidget("btnCopy", "images/copy_folder.gif", handleCopy, null, "<%= this.EncodeJS("IDS_NAV_COPY", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);
var btnDelete = newIconWidget("btnDelete", "images/delete.gif", handleDelete,null, "<%= this.EncodeJS("IDS_NAV_DELETE", WebDesktop.Utils.Constants.RM_GENERAL) %>", 16,16,3,3,25,3);

var toolbarContainer = newPaletteContainerWidget("toolbarContainer",null,0);      // Required
var toolbar = newPaletteWidget("toolbar");
toolbarContainer.add (toolbar);
toolbar.add (btnFolders);
toolbar.add (btnCategories);
toolbar.add (btnRefresh);
toolbar.add (btnProperties);
toolbar.add (btnMove);
toolbar.add (btnCopy);
toolbar.add (btnDelete);

function loadCB()
{
      toolbarContainer.init();
      toolbar.init();
      btnFolders.init();
      btnCategories.init();
      btnRefresh.init();
      btnProperties.init();
      btnMove.init();
      btnCopy.init();
      btnDelete.init();

      if (getGlobals().showFolders) {
            btnFolders.check(true,true);
      } else {
            btnCategories.check(true, true);
            btnCopy.setDisplay(false);
            setNavTitle(categoriesTitle, categoriesImg);
      }
      
      applyRights();
}      

var collapseImg = new Image();
collapseImg.src = "images/panel/arrow_left.gif";
var collapseImgOver = new Image();
collapseImgOver.src = "images/panel/arrow_left_hover.gif";

                  </script>
                  <table class="list" cellSpacing="0" cellPadding="0" width="100%" border="0">
                        <tr class="panelTitlebar">
                              <td align="left" valign="middle">
                                    <table cellpadding="0" cellspacing="0">
                                          <tr>
                                                <td><img id="navTitleImage" src="CeImages/folder.gif" align="middle" hspace="3" vspace="0"></td>
                                                <td class="panelText"><span id="navTitle"><%= this.EncodeJS("IDS_NAV_FOLDERS", WebDesktop.Utils.Constants.RM_GENERAL) %></span></td>
                                          </tr>
                                    </table>
                              </td>
                              <td align="right" class="panelText">
                                    <table cellpadding="0" cellspacing="0">
                                    <tr>
                                          <td>
                                                <asp:HyperLink id="navCollapseLink" runat="server" NavigateUrl="javascript:toggleNav(false);" CssClass="panelText"
                                                      onmouseover="panelButtonHover('navCollapseImg', collapseImgOver);" onmouseout="panelButtonHover('navCollapseImg', collapseImg);">
                                                      <asp:Label id="navCollapseLabel" runat="server">collapse</asp:Label>&nbsp;
                                                </asp:HyperLink>
                                          </td>
                                          <td>
                                                <asp:HyperLink id="navCollapseImgLink" runat="server" NavigateUrl="javascript:toggleNav(false);" CssClass="panelText"
                                                      onmouseover="panelButtonHover('navCollapseImg', collapseImgOver);" onmouseout="panelButtonHover('navCollapseImg', collapseImg);">
                                                      <asp:Image id="navCollapseImg" runat="server" ImageUrl="images/panel/arrow_left.gif" Height="11px"
                                                            Width="11px" ImageAlign="Middle" style="vertical-align:middle"></asp:Image>&nbsp;
                                                </asp:HyperLink>
                                          </td>
                                    </tr>
                                    </table>
                              </td>
                        </tr>
                        <tr>
                              <td colspan="2" class="panelToolbar">
                                    <script language="javascript">
                                          toolbarContainer.begin();
                                          toolbar.write();
                                          toolbarContainer.end();                              
                                    </script>
                              </td>
                        </tr>
                  </table>
            </form>
            <iframe name="navhiddenframe" width="0" height="0" src="javascript:parent.empty();"></iframe>
      </BODY>
</HTML>
0
 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13936778
You posted the asp source, the js experts work better when looking at js code instead of trying to decern what the asp.net does and then help with the js.

If you could view this page in your browser, then View->Source and copy and paste that.  This is what they are looking for.

Thanks.
0
 
LVL 1

Author Comment

by:cfetzer
ID: 13986929
I apologize for not responding to this sooner and closing this out.

I gave the points to GoofyDawg, because this is what I ended up doing.

I appreciate everyone's input!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question