hello
i have a question when i want to combined jquery with outsystem, i want to use the id element but i found the id looks like:
wt47_OutSystemsUIWeb_wt21_block_wtContent_wtMainContent_OutSystemsUIWeb_wt23_block_wtColumn1_OutSystemsUIWeb_wt61_block_wtContent
or something like:
wt9_OutSystemsUIWeb_wt21_block_wtContent_wtMainContent_OutSystemsUIWeb_wt69_block_wtColumn1_OutSystemsUIWeb_wt17_block_wtContent
BTW: this two is from same module same element but different screen
i want to know the Number after wt is a random number or it have some special meaning
thanks for your answer
Hi
Guessing the platform would generate the ids based on where it appears in the element tree.
Can you elaborate what you are trying to achieve ?
Also check out the master class on javascript & jQuery.
https://www.outsystems.com/learn/courses/44/master-class-on-javascript-and-jquery/
Regards
Amal
Hi Tim Lee,
For our purposes as developers, Ids have no meaning (they just uniquely identify html elements).
The platform build them as they become necessary and uses the element tree to determine what to place in them. Like Amal Raj mentions, seems the numbers have to do with order of the element being identified (most likely relative to the parent element).
tim lee wrote:
====You can use two method====
1-instead of id selector you can use the class selector.
For example.
document.getElementById("example");
replace with
document.getElementsByClassName("example");
2- In the second method you can use jquery find the method to find the id in the string.
Hope it will help you.
Regards,
Pankaj
Hi.
The only exception way to use the IDs of the elements you need to add an expression to the page with <script> and contains something like this
document.getElementById('"+input.id+"');
Where input is the name of one input element. This is the same id you use on labels or datapickers to mark the input that is associated.
Marcelo
thanks for all your reply
it helps me a lot
thanks
Hello Tim,
If any of the above posts have helped you solve your problem, please mark that as a solution.