On DOM Load JavaScript and Target

Avatar

Avatar
Springboard
Level 2
JonMaguire
Level 2

Likes

2 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Springboard
Validate 1
Give Back
Ignite 1
Establish
View profile

Avatar
Springboard
Level 2
JonMaguire
Level 2

Likes

2 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Springboard
Validate 1
Give Back
Ignite 1
Establish
View profile
JonMaguire
Level 2

30-03-2021

We have some auto complete JavaScript that is loaded on DOM ready. It is JS for autocomplete functionality for our forms. This is not being captured by one of our Target activities. Is there a way to make our Target activity aware of this?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

127 likes

Total Posts

192 posts

Correct reply

81 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

127 likes

Total Posts

192 posts

Correct reply

81 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
rush_pawan
Level 7

31-03-2021

your problem description is very abstract if you can share more details. 

 

based on below, as target response will be asynchronous either you can use mutation observer (https://www.smashingmagazine.com/2019/04/mutationobserver-api-guide/) to observe the activity injection in DOM and based on that function your js function OR define global javascript variable from js and track it.

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 3
Level 5
SundeepKatepally
Level 5

Likes

77 likes

Total Posts

76 posts

Correct reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile

Avatar
Give Back 3
Level 5
SundeepKatepally
Level 5

Likes

77 likes

Total Posts

76 posts

Correct reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile
SundeepKatepally
Level 5

04-04-2021

You can call the dom ready function from target too. In the activity you have an option of adding custom code, there you can add script to invoke dom ready function so that you are reinitializing after target activity