Custom HTML and Javascript Snippet

Content Type: Widget
Categories: Utility,User Interface,Data

Overview

This allows Mendix developers to execute custom JavaScript code inside a web page or Mendix UI context.

Developers can embed JavaScript directly in the widget configuration and optionally include HTML content with script tags.

This is useful for:

  • Running lightweight UI logic
  • Injecting HTML and binding interactions
  • Using jQuery conditionally
  • Integrating small dynamic behaviors without full widget development

 

Documentation

Introduction:

The Custom JS Widget enables Mendix developers to execute custom JavaScript directly within a web page or Mendix UI context.

It allows you to embed JavaScript inside the widget configuration and optionally include HTML content together with

 

Key Features:

 

1.Execute any custom JavaScript inside your Mendix application

 

2.Render HTML content and automatically execute inline

 

Recommended Query API per Mode

Pure JS (no) → document.querySelector()

jQuery Mode (jQuery3) → $(".selector")

HTML+JS (htmljs) → container.querySelector()

 

Refer the example given and try to play in Front-end.

 

Releases