Taking a shot in the dark...I know this is an old, unsupported version and control but I am so close to getting this huge application working in Google Chrome I just have to give it a shot. So right now the app works fine in IE but some nodes do NOT trigger a load event in Google Chrome; I dug into the JS files and I think I have a fix but no matter what I change, nothing changes. So I think this version uses the web resources and therefore the scripts are compiled in the DLLs right? So that is a dead end. BUT is there a way to disable the web resources or just point the app or the control to a script directory or a new ig_webtree.js file? I hope so.
Can anyone help?
Nothing to apologize for.
I cannot tell for sure if it will need only one or two or more tweaks to get it working in Chrome. This control has been developed before Chrome was there, also support for it has expired.
This makes it really hard for me finding the code base available and running a sample against it. Anyway, as I said the suggested approach should be working.
Both are possible, but of course the easier solution is to place the fix in the aspx page that has the tree control.
Is this what you have tried, or you initially placed it in the parent html? If so, this explains the errors you were getting.
So lets say this is the tree.aspx file:
<!DOCTYPE html> <html> <head runat="server"> <script type="text/javascript" src="myFix.js</script> </head> <body onload="myFix()"> </body> </html>
And myFix.js contains the overriden function:
function myFix() { $IG.WebDataTree.prototype.__ig_getNodeTextElement = function () { if (node.element) { var i; for (i = 0; i < node.element.childNodes.length; i++) { var attrib = node.element.childNodes[i].getAttribute("igtxt"); if (attrib == "1") return node.element.childNodes[i]; } } return null; } }
Let me know if placing the file correctly in the aspx page helped.
Meanwhile, you can actually check at runtime if this will work. Just paste the code directly in the Chrome dev tools console. You can place debugger inside the overriden function to make it easier. Then, do the required interaction that is expected to call this code, and will see if execeution is stopped at the debugger.
Oh wow, I sincerely apologize. This is great though. So it must be something I am doing. Sure this works on v10.3? Maybe I am putting this in the wrong place? So the app has an HTML page with two frames. The frame on the left loads the aspx page that contains the igtree control. Should this stuff go on the HTML page or on the aspx page that has the tree control?
Also, am I even on the right track? Meaning this control can work in Chrome if 1 or more JS functions are tweaked?
I don’t guess we can hook up on Skype or MS Teams?
Hi Peter,I am an Infragistics developer. I showed the approach how to make the code call the overriden function, which is a working solution.However, the errors you are getting suggest that the overriden function or the file that it contains it is not found.If you managed to resolve this, please confirm if the overriden function is now being called.
Maybe getting this version of the control working in Chrome is just impossible? I wish an Infragistics developer would chime in...with a give up it can't be done OR this control doesn't work because of X, Y, and Z and here is how you work around or resolve it...I would love to update the JS files and maybe recompile them myself or just override the functions that I think are the issue, which may or may not be the issue.
This is the function I am trying to override:
function ig_getNodeTextElement(node) { if(node.element) { var i; for(i=0; i < node.element.childNodes.length; i++) { var attrib = node.element.childNodes[i].getAttribute("igTxt"); if (attrib=="1") return node.element.childNodes[i]; } } return null; }
notice the igTxt; inspecting in chrome I see the tag as igtxt