web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

dynamics 365 marketing portal/ JS is not working in localized content of web page

(0) ShareShare
ReportReport
Posted on by 15

Hi guys,

In my dynamics 365 marketing portal, I add this simple js  in localized content of my passes web page (advance option) and it didn't work. 

Please have you an idea about. 

$(document).ready(function() {
alert("Test");
});

Many thanks.

I have the same question (0)
  • Suggested answer
    cloflyMao Profile Picture
    25,210 on at

    Hi Jean,

    1. Could you share me screenshot of:

    -> your passes web page(advance option)

    -> localized content

    2. Did you use marketing portal for hosting event website?

    If so, event portal is built with Angular and we should follow Angular syntax.

    As per my understanding and experience, pass web page is located in src\app\components\event\passes,

    if you would like to show an alert when open the page, then add alert inside ngOnInit function inside passes.component.ts.

    pastedimage1574652955685v1.png

    3. The code is jQuery function(only $(document).ready(function() {})), you could add reference to jQuery cdn file in index.html for test:

    pastedimage1574652298991v1.png

    However, the alert will work for all pages because it's on root page,

    while custom script on other child pages will be ignored whatever using jQuery or not,

    that's by Angular framework design.

    So if you want to make customization on pass web page, please achieve your logic in corresponding ts file, as I did in point 2.

    In addition, jQuery could still work under Angular, but you should develop the event portal code locally to import jQuery module,

    and it's not recommended because design of those 2 frameworks are different. 

    https://blog.bitsrc.io/how-to-use-jquery-with-angular-when-you-absolutely-have-to-42c8b6a37ff9

    Regards,

    Clofly

  • cloflyMao Profile Picture
    25,210 on at

    Hi Jean,

    Please let me know whether your problem could be solved.

    Regards,

    Clofly

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 131 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans