Tree Widget 

  

I am implementing a tree Widget, click on the node should simulate a click on the hidden button to call an action.

the code I'm using works in chrome but in IE the error [object Object]

javascript:alert('Choose one option below');osjs('.ButtonNone').click(); osjs('Id.Id').text('xxxx'); 
Hello Carlos.

What is the platform version that you're using?

What is the error you see in IE? Is it just "[object oject]"?

Pedro
Hello Pedro,
I'm developing in OutSystems 7
The error is at the beginning of the page, it will be the wrong version of jquery?,  I'm using the jquery OutSystems 7

Carlos
Are you using the Tree Widget component from the forge? Or building your own?
Can you post the javascript that you have in your page?
I'm using 1.0.0.3-Tree.Widget

this is the code that is generated,

Hi Carlos,

What are you trying to accomplish? Try to test each of your javascript statements (below), so that you can isolate the problem. The issue is likely related to one of them. Do these objects exist in the page? Keep in mind that Chrome can be hidding the error - hit F12 for opening the dev tools and search for any error notification there.

alert('Choose one option below');
osjs('.ButtonNone').click();
osjs('Id.Id').text('xxxx');


Hi Paulo,

Yes, this code
<script language='javascript'>
alert ('Choose one option below');
osjs ('ButtonNone.') click ().;
osjs ('Id.Id') text ('xxxx').;
</ script>
  Works in IE but when I generate dynamically the nodes of the tree code is this
javascript:alert('Choose one option below');osjs('.ButtonNone').click();

Hi Paulo,

In mozila also does not work, I can see the generated code, sending attached
Hi Carlos,

Have you tried using the button Id on the click event instead of the class?
It might be that the button is generated after the JS. If this is the case then the JS will only "know" the classes that were in the dom before.


Also noticed the following on your generated code (in the tree array)

return document.getElementById("OK.Id").show() - Is this a valid id?
osjs("Id.Id").text("xxxx"); - Is this a valid id?
osjs(#OK).click(); - Better enclose the Id in quotes



Hope it helps,
Nuno