How to change specific data of dialog box using js.

Avatar

Avatar
Validate 1
Level 1
ShagunMalik
Level 1

Like

1 like

Total Posts

55 posts

Correct reply

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

Avatar
Validate 1
Level 1
ShagunMalik
Level 1

Like

1 like

Total Posts

55 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Ignite 1
Give Back
View profile
ShagunMalik
Level 1

08-04-2021

In my dialog I want to change specific content like in my dialog I have written "Search result for {{currentPage}}". Now I want to change only content of {{currentPage}} using js. How can that be done?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile
asutosh_jena
Level 10

08-04-2021

Hi @ShagunMalik 

Using jquery you can do something like below:

 

<div class="something">Search result for {{currentPage}}</div>
var replaceString = $(".something").text();
var text = replaceString.replace("{{currentPage}}", "whatever text");
$(".something").text(text);

 

Thanks! 

Answers (0)