14 messaggi dal 05 novembre 2005
ho un problema con uno scipt, il quale premendo su un tasto - nasconde una parte di testo e premendo su + lo visualizza

File HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script src="dnncore.js"></script>
</head>

<BODY id="Body" ONSCROLL="__dnn_bodyscroll()" BOTTOMMARGIN="0" LEFTMARGIN="0" TOPMARGIN="0" RIGHTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<noscript></noscript>
<form name="Form" method="post" enctype="multipart/form-data" style="height:100%;" action="Untitled-1.htm" id="Form">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />

<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.Form;
}
else {
theform = document.forms["Form"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
<script src="dnn.js" tppabs="http://www.fatturafast.org/js/dnn.js"></script>

<TABLE class="containermaster_blue" cellSpacing="0" cellPadding="5" align="center" border="1">
<TR>
<TD class="containerrow1_blue">
<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
<TR>
<TD valign="middle" nowrap></TD>
<TD valign="middle" nowrap></TD>
<TD valign="middle" width="100%" nowrap>&nbsp;<span id="dnn_ctr375_dnnTITLE_lblTitle" class="Head">Collegamenti utili</span></TD>
<TD valign="middle" nowrap><a id="dnn_ctr375_dnnVISIBILITY_cmdVisibility" title="Riduci" onclick="if (__dnn_ContainerMaxMin_OnClick(this, 'dnn_ctr375_ModuleContent')) return false;" containerid="375" cookieid="_Module375_Visible" href="javascript:__doPostBack('dnn$ctr375$dnnVISIBILITY$cmdVisibility','')"><img src="../min.gif" alt="Riduci" width="12" height="15" border="0" id="dnn_ctr375_dnnVISIBILITY_imgVisibility"/></a> </TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD id="dnn_ctr375_ContentPane" align="left"><!-- Start_Module_375 -->
<div id="dnn_ctr375_ModuleContent">
<div id="dnn_ctr375_Links_pnlList">
<table id="dnn_ctr375_Links_lstLinks" cellspacing="0" cellpadding="0" summary="Links Design Table" border="0" style="border-collapse:collapse;">
<tr>
<td valign="Top">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td >Prova ingrandimeto/riduzione </td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td valign="Top">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td nowrap> Provaprovaprovaprova </td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</div>
<!-- End_Module_375 -->
</div></TD>
</TR>
<TR>
<TD>
<!--<HR class="containermaster_blue">-->
<!--<table width="186" height="2" border="1">
<tr>
<td>&nbsp;</td>
</tr>
</table>-->

<div></div>

<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
<TR>
<TD align="left" valign="middle" nowrap></TD>
<TD align="right" valign="middle" nowrap>&nbsp;<a id="dnn_ctr375_dnnACTIONBUTTON3_ico7" href="javascript:__doPostBack('dnn$ctr375$dnnACTIONBUTTON3$ico7','')"><img src="../print.gif" alt="" width="16" height="16" border="0" title="Stampa"/></a>&nbsp;</TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>

</form>
</BODY>
</HTML>




e ora vi metto gli scipt che ho trovato girando in internet, ma non capisco come funzionano
dnn.js:

var dnn;
var DNN_HIGHLIGHT_COLOR = '#9999FF';
var COL_DELIMITER = String .fromCharCode(18);
var ROW_DELIMITER = String .fromCharCode(17);

if (typeof(__dnn_m_aNamespaces) == 'undefined')//include in each DNN ClientAPI namespace file for dependency loading
var __dnn_m_aNamespaces = new Array();

//NameSpace DNN
function __dnn()
{
this.apiversion = .1;
this.pns = '';
this.ns = 'dnn';
this.diagnostics = null;
this.vars = null;
this.dependencies = new Array();
this.isLoaded = false;
}

__dnn.prototype.getVars = function()
{
if (this.vars == null)
{
this.vars = new Array();
var oCtl = dnn.dom.getById('__dnnVariable');
if (oCtl != null)
{
var aryItems = oCtl.value.split(ROW_DELIMITER);
for (var i=0; i<aryItems.length; i++)
{
var aryItem = aryItems[i].split(COL_DELIMITER);

if (aryItem.length == 2)
this.vars[aryItem[0]] = aryItem[1];
}
}
}
return this.vars;
}

__dnn.prototype.getVar = function(sKey)
{
return this.getVars()[sKey];
}

__dnn.prototype.setVar = function(sKey, sVal)
{
if (this.vars == null)
this.getVars();
this.vars[sKey] = sVal;
var oCtl = dnn.dom.getById('__dnnVariable');
if (oCtl == null)
{
oCtl = dnn.dom.createElement('INPUT');
oCtl.type = 'hidden';
oCtl.id = '__dnnVariable';
dnn.dom.appendChild(dnn.dom.getByTagName("body")[0], oCtl);
}
var sVals = '';
var sKey
for (sKey in this.vars)
{
sVals += ROW_DELIMITER + sKey + COL_DELIMITER + this.vars[sKey];
}
oCtl.value = sVals;
return true;
}

__dnn.prototype.callPostBack = function(sAction)
{
var sPostBack = dnn.getVar('__dnn_postBack');
var sData = '';
if (sPostBack.length > 0)
{
sData += sAction;
for (var i=1; i<arguments.length; i++)
{
var aryParam = arguments[i].split('=');
sData += COL_DELIMITER + aryParam[0] + COL_DELIMITER + aryParam[1];
}
eval(sPostBack.replace('[DATA]', sData));
}
}

__dnn.prototype.dependenciesLoaded = function()
{
return true;
}

__dnn.prototype.loadNamespace = function ()
{
if (this.isLoaded == false)
{
if (this.dependenciesLoaded())
{
dnn = this;
this.isLoaded = true;
this.loadDependencies(this.pns, this.ns);
}
}
}

__dnn.prototype.loadDependencies = function (sPNS, sNS)
{
for (var i=0; i<__dnn_m_aNamespaces.length; i++)
{
for (var iDep=0; i<__dnn_m_aNamespaces[i].dependencies.length; i++)
{
if (__dnn_m_aNamespaces[i].dependencies[iDep] == sPNS + (sPNS.length>0 ? '.': '') + sNS)
__dnn_m_aNamespaces[i].loadNamespace();
}
}
}


//--- dnn.dom
function dnn_dom()
{
this.pns = 'dnn';
this.ns = 'dom';
this.dependencies = 'dnn'.split(',');
this.isLoaded = false;
}

dnn_dom.prototype.getById = function (sID, oCtl)
{
if (oCtl == null)
oCtl = document;
if (oCtl.getElementById) //(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer) == false)
return oCtl.getElementById(sID);
else
return oCtl.all(sID);
}

dnn_dom.prototype.getByTagName = function (sTag, oCtl)
{
if (oCtl == null)
oCtl = document;
if (oCtl.getElementsByTagName) //(dnn.dom.browser.type == dnn.dom.browser.InternetExplorer)
return oCtl.getElementsByTagName(sTag);
else if (oCtl.all.tags)
return oCtl.all.tags(sTag);
else
return null;
}

dnn_dom.prototype.createElement = function (sTagName)
{
if (document.createElement)
return document.createElement(sTagName);
else
return null;
}

dnn_dom.prototype.isNonTextNode = function (oNode)
{
return (oNode.nodeType != 3 && oNode.nodeType != 8); //exclude nodeType of Text (Netscape/Mozilla) issue!
}

dnn_dom.prototype.getNonTextNode = function (oNode)
{
if (this.isNonTextNode(oNode))
return oNode;

while (oNode != null && this.isNonTextNode(oNode))
{
oNode = this.getSibling(oNode, 1);
}
return oNode;
}

dnn_dom.prototype.getSibling = function (oCtl, iOffset)
{
if (oCtl != null && oCtl.parentNode != null)
{
for (var i=0; i<oCtl.parentNode.childNodes.length; i++)
{
if (oCtl.parentNode.childNodes[i].id == oCtl.id)
{
if (oCtl.parentNode.childNodes[i + iOffset] != null)
return oCtl.parentNode.childNodes[i + iOffset];
}
}
}
}

dnn_dom.prototype.appendChild = function (oParent, oChild)
{
if (oParent.appendChild)
return oParent.appendChild(oChild);
else
return null;
}

dnn_dom.prototype.removeChild = function (oChild)
{
if (oChild.parentNode.removeChild)
return oChild.parentNode.removeChild(oChild);
else
return null;
}


dnn_dom.prototype.setCookie = function (sName, sVal, iDays, sPath, sDomain, bSecure)
{
var sExpires;
if (iDays)
{
sExpires = new Date();
sExpires.setTime(sExpires.getTime()+(iDays*24*60*60*1000));
}
document.cookie = sName + "=" + escape(sVal) + ((sExpires) ? "; expires=" + sExpires : "") +
((sPath) ? "; path=" + sPath : "") + ((sDomain) ? "; domain=" + sDomain : "") + ((bSecure) ? "; secure" : "");

if (document.cookie.length > 0)
return true;

}
dnn_dom.prototype.getCookie = function (sName)
{
var sCookie = " " + document.cookie;
var sSearch = " " + sName + "=";
var sStr = null;
var iOffset = 0;
var iEnd = 0;
if (sCookie.length > 0)
{
iOffset = sCookie.indexOf(sSearch);
if (iOffset != -1)
{
iOffset += sSearch.length;
iEnd = sCookie.indexOf(";", iOffset)
if (iEnd == -1)
iEnd = sCookie.length;
sStr = unescape(sCookie.substring(iOffset, iEnd));
}
}
return(sStr);
}

dnn_dom.prototype.deleteCookie = function (sName, sPath, sDomain)
{
if (this.getCookie(sName))
{
this.setCookie(sName, '', -1, sPath, sDomain);
return true;
}
return false;
}

dnn_dom.prototype.dependenciesLoaded = function()
{
return (typeof(dnn) != 'undefined');
}

dnn_dom.prototype.loadNamespace = function ()
{
if (this.isLoaded == false)
{
if (this.dependenciesLoaded())
{
dnn.dom = this;
this.isLoaded = true;
dnn.loadDependencies(this.pns, this.ns);
}
}
}


//--- dnn.dom.browser
function dnn_dom_browser()
{
this.pns = 'dnn.dom';
this.ns = 'browser';
this.dependencies = 'dnn,dnn.dom'.split(',');
this.isLoaded = false;
this.InternetExplorer = 'ie';
this.Netscape = 'ns';
this.Mozilla = 'mo';
this.Opera = 'op';
this.Safari = 'safari';
this.Konqueror = 'kq';

//Please offer a better solution if you have one!
var sType;
var agt=navigator.userAgent.toLowerCase();

if (agt.toLowerCase().indexOf('konqueror') != -1)
sType = this.Konqueror;
else if (agt.toLowerCase().indexOf('opera') != -1)
sType = this.Opera;
else if (agt.toLowerCase().indexOf('netscape') != -1)
sType = this.Netscape;
else if (agt.toLowerCase().indexOf('msie') != -1)
sType = this.InternetExplorer;
else if (agt.toLowerCase().indexOf('safari') != -1)
sType = 'safari';

if (sType == null)
sType = this.Mozilla;

this.type = sType;
this.version = parseFloat(navigator.appVersion);

var sAgent = navigator.userAgent.toLowerCase();
if (this.type == this.InternetExplorer)
{
var temp=navigator.appVersion.split("MSIE");
this.version=parseFloat(temp[1]);
}
if (this.type == this.Netscape)
{
var temp=sAgent.split("netscape");
this.version=parseFloat(temp[1].split("/")[1]);
}

//this.majorVersion = null;
//this.minorVersion = null;
}

dnn_dom_browser.prototype.toString = function ()
{
return this.type + ' ' + this.version;
}

dnn_dom_browser.prototype.isType = function ()
{
for (var i=0; i<arguments.length; i++)
{
if (dnn.dom.browser.type == arguments[i])
return true;
}
return false;
}

dnn_dom_browser.prototype.dependenciesLoaded = function()
{
return (typeof(dnn) != 'undefined' && typeof(dnn.dom) != 'undefined');
}

dnn_dom_browser.prototype.loadNamespace = function ()
{
if (this.isLoaded == false)
{
if (this.dependenciesLoaded())
{
dnn.dom.browser = this;
this.isLoaded = true;
dnn.loadDependencies(this.pns, this.ns);
}
}
}

//--- End dnn.dom.browser


dnn_dom.prototype.attachEvent = function (oCtl, sType, fHandler)
{
if (dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer) == false)
{
var sName = sType.substring(2);
oCtl.addEventListener(sName, function (evt) {dnn.dom.event = new dnn_dom_event(evt, evt.target); return fHandler();}, false);
}
else
oCtl.attachEvent(sType, function () {dnn.dom.event = new dnn_dom_event(window.event, window.event.srcElement); return fHandler();});
return true;
}

function dnn_dom_event(e, srcElement)
{
this.object = e;
this.srcElement = srcElement;
}

//--- End dnn.dom


//--- End dnn

//load namespaces
__dnn_m_aNamespaces[__dnn_m_aNamespaces.length] = new dnn_dom_browser();
__dnn_m_aNamespaces[__dnn_m_aNamespaces.length] = new dnn_dom();
__dnn_m_aNamespaces[__dnn_m_aNamespaces.length] = new __dnn();
for (var i=__dnn_m_aNamespaces.length-1; i>=0; i--)
__dnn_m_aNamespaces[i].loadNamespace();


dnncore.jss

var DNN_COL_DELIMITER = String .fromCharCode(16);
var DNN_ROW_DELIMITER = String .fromCharCode(15);
var __dnn_m_bPageLoaded = false;

window.onload = __dnn_Page_OnLoad;

function __dnn_ClientAPIEnabled()
{
return typeof(dnn) != 'undefined';
}


function __dnn_Page_OnLoad()
{
if (__dnn_ClientAPIEnabled())
{
var sLoadHandlers = dnn.getVar('__dnn_pageload');
if (sLoadHandlers != null)
eval(sLoadHandlers);
}
__dnn_m_bPageLoaded = true;
}

function __dnn_KeyDown(iKeyCode, sFunc, e)
{
if (e == null)
e = window.event;

if (e.keyCode == iKeyCode)
{
eval(unescape(sFunc));
return false;
}
}

function __dnn_bodyscroll()
{
var oF=document.forms[0];
if (__dnn_ClientAPIEnabled() && __dnn_m_bPageLoaded)
oF.ScrollTop.value=dnn.dom.getByTagName("body")[0].scrollTop;
}

function __dnn_setScrollTop(iTop)
{
if (__dnn_ClientAPIEnabled())
{
if (iTop == null)
iTop = document.forms[0].ScrollTop.value;

var sID = dnn.getVar('ScrollToControl');
if (sID != null && sID.length > 0)
{
var oCtl = dnn.dom.getById(sID);
if (oCtl != null)
{
iTop = dnn.dom.positioning.elementTop(oCtl);
dnn.setVar('ScrollToControl', '');
}
}
dnn.dom.getByTagName("body")[0].scrollTop = iTop;
}
}

//Focus logic
function __dnn_SetInitialFocus(sID)
{
var oCtl = dnn.dom.getById(sID);
if (oCtl != null && __dnn_CanReceiveFocus(oCtl))
oCtl.focus();
}

function __dnn_CanReceiveFocus(e)
{
//probably should call getComputedStyle for classes that cause item to be hidden
if (e.style.display != 'none' && e.tabIndex > -1 && e.disabled == false && e.style.visible != 'hidden')
{
var eParent = e.parentElement;
while (eParent != null && eParent.tagName != 'BODY')
{
if (eParent.style.display == 'none' || eParent.disabled || eParent.style.visible == 'hidden')
return false;
eParent = eParent.parentElement;
}
return true;
}
else
return false;
}

//Max/Min Script
function __dnn_ContainerMaxMin_OnClick(oLnk, sContentID)
{
var oContent = dnn.dom.getById(sContentID);
if (oContent != null)
{
var oBtn = oLnk.childNodes[0];
var sContainerID = oLnk.getAttribute('containerid');
var sCookieID = oLnk.getAttribute('cookieid');
var sCurrentFile = oBtn.src.toLowerCase().substr(oBtn.src.lastIndexOf('/'));
var sMaxFile;
var sMaxIcon;
var sMinIcon;

if (dnn.getVar('min_icon_' + sContainerID))
sMinIcon = dnn.getVar('min_icon_' + sContainerID);
else
sMinIcon = dnn.getVar('min_icon');

if (dnn.getVar('max_icon_' + sContainerID))
sMaxIcon = dnn.getVar('max_icon_' + sContainerID);
else
sMaxIcon = dnn.getVar('max_icon');

sMaxFile = sMaxIcon.toLowerCase().substr(sMaxIcon.lastIndexOf('/'));

if (sCurrentFile == sMaxFile)
{
oBtn.src = sMinIcon;
oContent.style.display = '';
oBtn.title = dnn.getVar('min_text');
if (sCookieID != null)
{
if (dnn.getVar('__dnn_' + sContainerID + ':defminimized') == 'true')
dnn.dom.setCookie(sCookieID, 'true', 365);
else
dnn.dom.deleteCookie(sCookieID);
}
else
dnn.setVar('__dnn_' + sContainerID + '_Visible', 'true');
}
else
{
oBtn.src = sMaxIcon;
oContent.style.display = 'none';
oBtn.title = dnn.getVar('max_text');
if (sCookieID != null)
{
if (dnn.getVar('__dnn_' + sContainerID + ':defminimized') == 'true')
dnn.dom.deleteCookie(sCookieID);
else
dnn.dom.setCookie(sCookieID, 'false', 365);
}
else
dnn.setVar('__dnn_' + sContainerID + '_Visible', 'false');
}

return true;//cancel postback
}
return false;//failed so do postback
}

function __dnn_Help_OnClick(sHelpID)
{
var oHelp = dnn.dom.getById(sHelpID);
if (oHelp != null)
{
if (oHelp.style.display == 'none')
oHelp.style.display = '';
else
oHelp.style.display = 'none';

return true;//cancel postback
}
return false;//failed so do postback
}

function __dnn_SectionMaxMin(oBtn, sContentID)
{
var oContent = dnn.dom.getById(sContentID);
if (oContent != null)
{
var sMaxIcon = oBtn.getAttribute('max_icon');
var sMinIcon = oBtn.getAttribute('min_icon');
if (oContent.style.display == 'none')
{
oBtn.src = sMinIcon;
oContent.style.display = '';
dnn.setVar(oBtn.id + ':exp', 1);
}
else
{
oBtn.src = sMaxIcon;
oContent.style.display = 'none';
dnn.setVar(oBtn.id + ':exp', 0);
}
return true;//cancel postback
}
return false;//failed so do postback
}

//Drag N Drop
function __dnn_enableDragDrop()
{
var aryConts = dnn.getVar('__dnn_dragDrop').split(";");
var aryTitles;

for (var i=0; i < aryConts.length; i++)
{
aryTitles = aryConts[i].split(" ");
if (aryTitles[0].length > 0)
{
var oCtr = dnn.dom.getById(aryTitles[0]);
var oTitle = dnn.dom.getById(aryTitles[1]);
if (oCtr != null && oTitle != null)
{
oCtr.setAttribute('moduleid', aryTitles[2]);
dnn.dom.positioning.enableDragAndDrop(oCtr, oTitle, '__dnn_dragComplete()', '__dnn_dragOver()');
}
}
}
}

var __dnn_oPrevSelPane;
var __dnn_oPrevSelModule;
var __dnn_dragEventCount=0;
function __dnn_dragOver()
{
__dnn_dragEventCount++;
if (__dnn_dragEventCount % 75 != 0)//only calculate position every 75 events
return;

var oCont = dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);

var oPane = __dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);

if (__dnn_oPrevSelPane != null)//reset previous pane's border
__dnn_oPrevSelPane.pane.style.border = __dnn_oPrevSelPane.origBorder;

if (oPane != null)
{
__dnn_oPrevSelPane = oPane;
oPane.pane.style.border = '4px double ' + DNN_HIGHLIGHT_COLOR;
var iIndex = __dnn_getPaneControlIndex(oCont, oPane);

var oPrevCtl;
var oNextCtl;
for (var i=0; i<oPane.controls.length; i++)
{
if (iIndex > i && oPane.controls[i].id != oCont.id)
oPrevCtl = oPane.controls[i];
if (iIndex <= i && oPane.controls[i].id != oCont.id)
{
oNextCtl = oPane.controls[i];
break;
}
}

if (__dnn_oPrevSelModule != null)
dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border = __dnn_oPrevSelModule.origBorder;


if (oNextCtl != null)
{
__dnn_oPrevSelModule = oNextCtl;
dnn.dom.getNonTextNode(oNextCtl.control).style.borderTop = '5px groove ' + DNN_HIGHLIGHT_COLOR;
}
else if (oPrevCtl != null)
{
__dnn_oPrevSelModule = oPrevCtl;
dnn.dom.getNonTextNode(oPrevCtl.control).style.borderBottom = '5px groove ' + DNN_HIGHLIGHT_COLOR;
}
}
}

function __dnn_dragComplete()
{
var oCtl = dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);
var sModuleID = oCtl.getAttribute('moduleid');

if (__dnn_oPrevSelPane != null)
__dnn_oPrevSelPane.pane.style.border = __dnn_oPrevSelPane.origBorder;

if (__dnn_oPrevSelModule != null)
dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border = __dnn_oPrevSelModule.origBorder;

var oPane = __dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);
var iIndex;
if (oPane == null)
{
var oPanes = __dnn_Panes();
for (var i=0; i<oPanes.length; i++)
{
if (oPanes[i].id == oCtl.parentNode.id)
oPane = oPanes[i];
}
}
if (oPane != null)
{
iIndex = __dnn_getPaneControlIndex(oCtl, oPane);
__dnn_MoveToPane(oPane, oCtl, iIndex);

dnn.callPostBack('MoveToPane', 'moduleid=' + sModuleID, 'pane=' + oPane.paneName, 'order=' + iIndex * 2);
}
}

function __dnn_MoveToPane(oPane, oCtl, iIndex)
{

if (oPane != null)
{
var aryCtls = new Array();
for (var i=iIndex; i<oPane.controls.length; i++)
{
if (oPane.controls[i].control.id != oCtl.id)
aryCtls[aryCtls.length] = oPane.controls[i].control;

dnn.dom.removeChild(oPane.controls[i].control);
}
dnn.dom.appendChild(oPane.pane, oCtl);
oCtl.style.top=0;
oCtl.style.left=0;
oCtl.style.position = 'relative';
for (var i=0; i<aryCtls.length; i++)
{
dnn.dom.appendChild(oPane.pane, aryCtls[i]);
}
__dnn_RefreshPanes();
}
else
{
oCtl.style.top=0;
oCtl.style.left=0;
oCtl.style.position = 'relative';
}
}

function __dnn_RefreshPanes()
{
var aryPanes = dnn.getVar('__dnn_Panes').split(';');
var aryPaneNames = dnn.getVar('__dnn_PaneNames').split(';');
__dnn_m_aryPanes = new Array();
for (var i=0; i<aryPanes.length; i++)
{
if (aryPanes[i].length > 0)
__dnn_m_aryPanes[__dnn_m_aryPanes.length] = new __dnn_Pane(dnn.dom.getById(aryPanes[i]), aryPaneNames[i]);
}
}

var __dnn_m_aryPanes;
var __dnn_m_aryModules;
function __dnn_Panes()
{
if (__dnn_m_aryPanes == null)
{
__dnn_m_aryPanes = new Array();
__dnn_RefreshPanes();
}
return __dnn_m_aryPanes;
}

function __dnn_Modules(sModuleID)
{
if (__dnn_m_aryModules == null)
__dnn_RefreshPanes();

return __dnn_m_aryModules[sModuleID];
}

function __dnn_getMostSelectedPane(oContent)
{
var oCDims = new dnn.dom.positioning.dims(oContent);
var iTopScore=0;
var iScore;
var oTopPane;
for (var i=0; i<__dnn_Panes().length; i++)
{
var oPane = __dnn_Panes()[i];
var oPDims = new dnn.dom.positioning.dims(oPane.pane);
iScore = dnn.dom.positioning.elementOverlapScore(oPDims, oCDims);

if (iScore > iTopScore)
{
iTopScore = iScore;
oTopPane = oPane;
}
}
return oTopPane;
}

function __dnn_getPaneControlIndex(oContent, oPane)
{
if (oPane == null)
return;
var oCDims = new dnn.dom.positioning.dims(oContent);
var oCtl;
if (oPane.controls.length == 0)
return 0;
for (var i=0; i<oPane.controls.length; i++)
{
oCtl = oPane.controls[i];
var oIDims = new dnn.dom.positioning.dims(oCtl.control);
if (oCDims.t < oIDims.t)
return oCtl.index;
}
if (oCtl != null)
return oCtl.index+1;
else
return 0;
}

//Objects
function __dnn_Pane(ctl, sPaneName)
{
this.pane = ctl;
this.id = ctl.id;
this.controls = new Array();
this.origBorder = ctl.style.border;
this.paneName = sPaneName;

var iIndex = 0;
var strModuleOrder='';
for (var i=0; i<ctl.childNodes.length; i++)
{
var oNode = ctl.childNodes[i];
if (dnn.dom.isNonTextNode(oNode))
{
if (__dnn_m_aryModules == null)
__dnn_m_aryModules = new Array();

//if (oNode.tagName == 'A' && oNode.childNodes.length > 0)
//oNode = oNode.childNodes[0];//DNN now embeds anchor tag

var sModuleID = oNode.getAttribute('moduleid');
if (sModuleID != null && sModuleID.length > 0)
{
strModuleOrder += sModuleID + '~';
this.controls[this.controls.length] = new __dnn_PaneControl(oNode, iIndex);
__dnn_m_aryModules[sModuleID] = oNode.id;
iIndex+=1;
}
}
}
this.moduleOrder = strModuleOrder;

}

function __dnn_PaneControl(ctl, iIndex)
{
this.control = ctl;
this.id = ctl.id;
this.index = iIndex;
this.origBorder = ctl.style.border;

}



Vi posterei un esempi gia quasi completo, ma non sono capace e non so se si può pubblicare file!!
Help me

FDR
onestamente è difficile mettersi a leggere tutto il codice, riesci a isolare il problema? e ad entrare più nel dettaglio nel problema?
ricevi un eccezione premi il bottone e non succede niente?

ciao marco

Chi parla senza modestia troverà difficile rendere buone le proprie parole.
Confucio

http://nostromo.spaces.live.com/default.aspx
14 messaggi dal 05 novembre 2005
carica la pagina e non da nessun errore, ma non esgue nemmeno lo scipt, se vi create i file incollando solo il codice che vi ho dato, otterrete quello che ottengo io!!!

FDR

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.