Home - Forums-.NET - FlyTreeView (ASP.NET) - javascript Expand() problem on mozilla firefox.

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

javascript Expand() problem on mozilla firefox.
Link Posted: 24-Sep-2006 20:09
Hi.
I have two framed (left-right) page.
left:flytreeview(2.0):list of folders   right:list of assets and folders

when i click a folder on right frame i am sending objectId parameter to left frame by javascript and i am finding the parent frame and expanding it.

i created my code with your advices and it runs successfully at IE6.0 and OPERA browsers. but it there is a problem on Mozilla Firefox/1.5.0.7.
My code is below:
var sourceNodes = currentTree.findAll(function(node) { return node.getValue() == document.getElementById('_MtsProjectExplorer2_1_txtObjectId').value; })
            if (sourceNodes.length > 0)
            {
                sourceNodes[0].expand();
                document.getElementById('_MtsProjectExplorer2_1_txtObjectId').value = '';
            }


the \"Loading...\" alert is appearing on the right node but the loading does not finishes succesfully. \"Loading...\" alert waiting there, is not disappearing.
When i click \"+\" sign on any node it expands successfully. But as i told above javascript Expand() command fails. Also this error occurs only in mozilla firefox.

Please advice me to resolve this problem.
Thanks.
Link Posted: 24-Sep-2006 20:31
Typically the Mozilla Firefox browser contains JavaScript Console (Tools menu) that shows the source of error.

Actually, I've tested the code I provided you earlier using the Firefox browser and it was ok.

So please could you provide me with the details of error using JavaScript Console?
Link Posted: 24-Sep-2006 20:50
continue
Link Posted: 24-Sep-2006 20:54
sorry. I saw the error now. errors are like below

Error: Unknown property 'maring'.  Declaration dropped.
Source File: http://www.9rays.net/forums/posting.php?mode=reply&t=1105
Line: 24

Error: Unrecognized at-rule or error parsing at-rule '@import'.
Source File: http://www.9rays.net/forums/posting.php?mode=reply&t=1105
Line: 224

Error: Unknown property 'maring'.  Declaration dropped.
Source File: http://www.9rays.net/forums/posting.php
Line: 24

Error: Unrecognized at-rule or error parsing at-rule '@import'.
Source File: http://www.9rays.net/forums/posting.php
Line: 224
Link Posted: 24-Sep-2006 23:51
I mean you should open your page with flytreeview, clear javascript console log (there's button) and then execute some actions on flytreeview to make javascript code running. Then we'll be able to get required errors from Javascript console.
Link Posted: 25-Sep-2006 00:36
yes i made javasctript console as you told, and the errors above are what i see there.

aren't those errors required and related for you? i could not understand you or you didn' see the errors that i sent.
Link Posted: 25-Sep-2006 01:43
All the error you provide has the line:
Source File: http://www.9rays.net/...

It means that the source is from http://www.9rays.net and not your localhost, where you're debugging your code.
Link Posted: 25-Sep-2006 20:32
sorry for my ignorance.

i cleared css errors on my css file and later i could see these errors on console.

Error: [Exception... \"'Permission denied to set property EventTarget.addEventListener' when calling method: [nsIOnReadyStateChangeHandler:]\"  nsresult: \"0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)\"  location: \"JS frame :: http://localhost/metusonline3/FrameLeft.aspx?frame=true&guid=3c373090-b3d5-46fe-8c79-86156f9a9c5a :: onNodeEventHandler :: line 293\"  data: no]
Source File: http://localhost/metusonline3/FrameLeft.aspx?frame=true&guid=3c373090-b3d5-46fe-8c79-86156f9a9c5a
Line: 293


Error: [Exception... \"'Permission denied to get property XULElement.accessKey' when calling method: [nsIDOMXULLabelElement:]\"  nsresult: \"0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)\"  location: \"JS frame :: http://localhost/MetusOnline3/WebResource.axd?d=vmmUjOzBugGIH9-N_bf5MBFCrZrI0yTU7__EFqpa2SLobFNtbMh3xEtGhJYRbyI1jyb0MXLyAuRDPoaWwr07zZxa9AvX56QIhreqqZ4bR6A1&t=632944558920000000 :: _fv37 :: line 2038\"  data: no]
Source File: http://localhost/MetusOnline3/WebResource.axd?d=vmmUjOzBugGIH9-N_bf5MBFCrZrI0yTU7__EFqpa2SLobFNtbMh3xEtGhJYRbyI1jyb0MXLyAuRDPoaWwr07zZxa9AvX56QIhreqqZ4bR6A1&t=632944558920000000
Line: 2038

i hope these are what you want.

thanks.
Link Posted: 25-Sep-2006 20:42
source of
http://localhost/MetusOnline3/WebResource.axd?d=vmmUjOzBugGIH9-N_bf5MBFCrZrI0yTU7__EFqpa2SLobFNtbMh3xEtGhJYRbyI1jyb0MXLyAuRDPoaWwr07zZxa9AvX56QIhreqqZ4bR6A1&t=632944558920000000

function _fv37(_fv426){  //166
line2035-->var _fv300;
line2036-->if (_fv417(typeof(DOMParser))){
line2037-->var _fv427=new DOMParser();
line2038-->_fv300=_fv427.parseFromString(_fv426, \"\\x74\\x65\\x78\\x74\\x2f\\x78\\x6d\\x6c\");
line2039-->} else if (_fv417(typeof(ActiveXObject))){
line2040-->_fv300=new ActiveXObject(\"\\x4d\\x73\\x78\\x6d\\x6c\\x32\\x2e\\x46\\x72\\x65\\x65\\x54\\x68\\x72\\x65\\x61\\x64\\x65\\x64\\x44\\x4f\\x4d\\x44\\x6f\\x63\\x75\\x6d\\x65\\x6e\\x74\\x2e\\x33\\x2e\\x30\");
line2041-->_fv300.loadXML(_fv426);
}



source of
http://localhost/metusonline3/FrameLeft.aspx?frame=true&guid=3c373090-b3d5-46fe-8c79-86156f9a9c5a

    
line 293-->function onNodeEventHandler(treeview, node, eventType)
    line 294-->{
    line 295-->    alert(eventType);
    line 296-->    if (eventType == \"collapsed\")
    line 297-->    {
    line 298-->        var childNodes = node.getChildNodes();
    line 299-->        for(var i = 0; i < childNodes.length; i++)
    line \"\"\"-->        {
    line \"\"\"-->           var curChild = childNodes[i];
    line \"\"\"-->           curChild.remove();
    line \"\"\"-->       }
    line \"\"\"-->       node.setPopulateNodesOnDemand(true);
    line \"\"\"-->  }      
    line \"\"\"-->}
Link Posted: 25-Sep-2006 21:10
I think these errors may not be the cause of expand problem. on most of my tests these errors does not occurs on the console. the \"loading...\" alert  standing all time and at the statusbar always displays \"read localhost\".

Also when i use the treewiev without javascript expand command, i always see \"transferring data from localhost\" alert although the expand process' are finished.