311
Views
6
Comments
html tag id
Question

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

2024-12-19 12-19-39
Amal
 
MVP

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

2019-09-24 18-41-25
Jorge Martins
 
MVP

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).

2018-08-26 20-34-32
Pankaj pant

tim lee wrote:

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 Tim Lee,

====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


2019-05-22 11-30-09
Marcelo Ferreira

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.

Regards,

Marcelo

UserImage.jpg
tim lee

thanks for all your reply 

it helps me a lot 


thanks



2024-12-19 12-19-39
Amal
 
MVP

Hello Tim,

If any of the above posts have helped you solve your problem, please mark that as a solution. 


Regards

Amal 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.