Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To open an existing website chat widget from your own button, attach a click handler to a semantic <button> and call the API for the widget you installed. The command depends on the widget generation: Zendesk Messaging uses zE('messenger', 'open'), while Zendesk Web Widget (Classic) uses zE('webWidget', 'open'). Intercom uses a configured element ID or class as a custom launcher rather than the Zendesk command.

First identify the provider and widget generation, then confirm its script is loaded and the widget is enabled. If you hid the launcher or widget earlier, restore visibility before opening it. The examples below show the production pattern, accessibility considerations, loading pitfalls, and troubleshooting steps.

The basic pattern: a real button plus the vendor’s open method

Use a native button for an action that opens chat. It can receive focus, activate with Enter or Space, and exposes button semantics to assistive technology without extra keyboard code.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<button id="help-button" type="button">Chat with us</button>
<script>
  document.getElementById('help-button').addEventListener('click', function () {
    zE('messenger', 'open'); // Zendesk Messaging Web Widget
  });
</script>

This example assumes the Zendesk Messaging snippet has already loaded and that the account has the Web Widget enabled. For Zendesk Web Widget (Classic), replace the call with zE('webWidget', 'open'). Do not mix the namespaces: Messaging and Classic are separate widget generations with different APIs.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Opening the widget is not the same as starting a new conversation. Zendesk Messaging has a separate UI API for creating a new conversation; use that only when your button is intended to begin a new thread rather than display the existing messenger.

Choose the correct widget API before writing code

The most common failure is copying a valid command for the wrong product generation. Use the widget name shown in your provider’s admin settings or installation instructions.

Approach Command or setup Best fit Important limitation
Keep the provider’s launcher No custom click handler Sites that need the quickest installation and accept the provider’s placement and styling You have less control over where the launch control appears and how it looks.
Custom Zendesk Messaging button zE('messenger', 'open') An existing Zendesk Messaging Web Widget that should open from a site-designed control If you previously hid the widget, call show before opening it; this is not the Classic API.
Custom Zendesk Classic button zE('webWidget', 'open'); if hidden, show it first An existing Zendesk Web Widget (Classic) Classic and Messaging use different command namespaces and behavior.
Intercom custom launcher Assign a configured element ID or class in Intercom An Intercom Messenger configured to launch from an existing page element The exact controls and account settings depend on the active Intercom setup.

Zendesk describes the launcher as the interface element a customer clicks to open the widget. A custom button simply moves that action to a control you design, while the hosted widget remains responsible for the conversation UI.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prerequisites before attaching the click handler

  • Know the provider and generation. Confirm whether the installation is Zendesk Messaging, Zendesk Classic, Intercom, or another vendor. The commands in this article are not interchangeable across products.
  • Install the vendor snippet. The page must include the provider’s current JavaScript snippet, normally supplied in the account’s installation instructions.
  • Enable the widget for the site. An API call cannot open a widget that is disabled for the account, domain, environment, or page.
  • Place the button after it exists in the DOM. The example uses an element ID. If your script runs before the button markup, bind the listener after the markup is parsed or from your site’s normal component lifecycle.
  • Decide whether the default launcher should remain visible. Leaving it in place provides a fallback. Hiding it gives you full control, but then your custom control must be available and accessible wherever visitors need help.

Zendesk Messaging: open the widget from a custom button

Zendesk’s Messaging Web Widget uses the messenger namespace. Its open method displays the messaging widget in the visitor’s current state.

1. Add a semantic launcher

<button id="help-button" type="button">Chat with us</button>

Use a visible text label whenever possible. For an icon-only control, provide an accessible name with text that is visually hidden or an appropriate aria-label, and keep a visible focus indicator.

2. Bind the click event

<script>
  document.getElementById('help-button').addEventListener('click', function () {
    zE('messenger', 'open');
  });
</script>

Call this only after the Zendesk snippet is available. If the site loads the widget asynchronously, follow the current Zendesk loading guidance for your implementation rather than assuming a universal callback name.

3. Restore visibility when you hid the widget

Zendesk Messaging separates visibility from open state. show displays a widget that was hidden and restores its previous state; open opens the messaging panel. If your configuration never calls hide, the widget is shown by default and the open call is normally sufficient.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<script>
  document.getElementById('help-button').addEventListener('click', function () {
    zE('messenger', 'show');
    zE('messenger', 'open');
  });
</script>

Use this two-call pattern only when your page or account configuration can leave the widget hidden. Calling show is not a replacement for open; it controls visibility, while open controls the panel state.

4. Close or hide deliberately

The Messaging API also distinguishes close from hide. Closing collapses the open panel while leaving the widget available; hiding removes it from view. Keep those actions separate in your page logic so a later custom-launcher click can restore the intended state.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Zendesk Web Widget (Classic): use the Classic namespace

Zendesk Web Widget (Classic) uses zE('webWidget', ...). Its open command forces the widget open. show restores a widget that was hidden, and toggle opens a closed widget or closes an open one.

Minimal custom button

<button id="help-button" type="button">Chat with us</button>
<script>
  document.getElementById('help-button').addEventListener('click', function () {
    zE('webWidget', 'open');
  });
</script>

When the Classic launcher was hidden

Zendesk’s Classic custom-launcher tutorial hides the default launcher and then calls show followed by open from the custom action. The sequence matters: first make the widget visible, then force it open.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<script>
  document.getElementById('help-button').addEventListener('click', function () {
    zE('webWidget', 'show');
    zE('webWidget', 'open');
  });
</script>

Do not substitute the Messaging command in a Classic installation. Although both products use zE, the namespaces identify different APIs.

Choose open or toggle

  • Use open when the button should always leave the widget open. Repeated clicks have a predictable result.
  • Use toggle only when the same control is intentionally a show-or-hide switch. It changes behavior based on the current state, which can be confusing if the label always says “Chat with us.”

Intercom: configure the element as a custom launcher

Intercom supports a custom launcher by assigning a selected element ID or class in the Messenger configuration. Instead of calling the Zendesk-style zE function, designate the existing page element in Intercom’s custom-launcher settings and follow the instructions for the account’s current Messenger implementation.

Recommended markup

<button id="help-button" type="button">Chat with us</button>

Use the exact ID or class configured in Intercom. If the element is replaced by a single-page application route change, reapply the configuration or preserve the same element according to Intercom’s current guidance. Because Intercom account interfaces and Messenger versions can differ, do not assume a Zendesk command or an undocumented callback will work.

Keep the default launcher or replace it?

Keep the provider’s launcher

This is the lowest-maintenance option. The vendor controls placement, state handling, and keyboard behavior, and you avoid duplicate controls. It is suitable when the launcher’s position and visual treatment fit your site.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add a custom button while leaving the launcher visible

This gives visitors a prominent, contextual entry point—such as a “Questions about this plan?” button—while retaining the vendor control as a fallback. Check responsive layouts so the two controls do not overlap.

Hide the default launcher and use only your control

This provides the most design control but makes your button responsible for discoverability, accessible labeling, focus visibility, and coverage across all relevant pages. For Zendesk, remember that a hidden widget may require show before open.

Accessibility requirements for a custom chat launcher

  • Use <button type="button">. The explicit type prevents accidental form submission when the control sits inside a checkout, contact, or search form.
  • Give it a clear accessible name. “Chat with us” or “Open support chat” communicates the action better than an unlabeled speech-bubble icon.
  • Keep focus visible. Do not remove the browser outline unless you replace it with an equally clear focus style.
  • Make the hit area usable. The control should remain easy to activate on touch screens and should not be hidden behind cookie notices, sticky headers, or other overlays.
  • Preserve keyboard access to the conversation. After the widget opens, users must be able to reach its controls, send a message, and dismiss it without a mouse.
  • Use a link only for navigation. If the control should lead to a support page when JavaScript is unavailable, use a meaningful destination. Avoid a fake href="#" that jumps the page to the top.
  • Do not rely on color alone. Text, an icon with an accessible name, and sufficient contrast should identify the launcher in every state.

Loading, single-page applications, and duplicate handlers

Confirm the vendor function exists

A click handler can run before a hosted widget script has finished loading. In that case the browser may report that zE is undefined, or the call may be ignored by the provider’s loader. Test the actual page after the snippet has loaded, and use the vendor’s documented loading or readiness mechanism for asynchronous installations. There is no single readiness callback that applies to every chat platform.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Bind once in a single-page application

Frameworks often mount and unmount components as routes change. Attach the listener in the component’s mount lifecycle and remove it during unmount, or use the framework’s normal event binding. Otherwise one click can execute the open command several times because old listeners remain attached.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the button stable when possible

If the provider identifies a custom launcher by element ID or class, preserve that identifier across route changes. Replacing the element without reapplying the provider configuration can break the association even though the button still looks correct.

Avoid competing click logic

Do not attach both an inline handler and an event-listener callback to the same button unless you deliberately want both actions. Also check for parent handlers that call preventDefault, stop propagation, submit a form, or navigate away before the widget can open.

Troubleshooting: when the widget does not open

The button does nothing

  1. Open the browser console and check for a JavaScript error on the click.
  2. Verify that the button’s ID exactly matches the selector in your script.
  3. Confirm that the provider snippet appears on the page and that the widget is enabled for this domain and environment.
  4. Check that the command namespace matches the installed generation: messenger for Zendesk Messaging or webWidget for Classic.
  5. Test after the widget has finished loading, then implement the provider’s documented asynchronous pattern if load timing is the cause.

The console says the API is undefined

The click is reaching your handler, but the vendor script is not ready or was blocked. Inspect the network and content-security-policy logs, verify the snippet was not removed by a consent manager, and follow the vendor’s current installation requirements. Do not “fix” this by inventing a timeout; a fixed delay can still fail on slow connections.

The widget is hidden after clicking

Inspect your page code for an earlier hide call or a configuration that suppresses the launcher. For Zendesk Messaging and Classic, restore visibility with the appropriate show call before open. Also make sure a CSS rule, modal backdrop, or z-index value is not covering the widget after it opens.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The wrong panel or state appears

Opening a widget resumes its existing state. It does not necessarily create a new conversation or clear prior messages. If your product requirement is a new conversation, use the provider’s separate conversation-creation API where available and explain that behavior in the button label.

It works on one route but not another

Compare the rendered HTML, script loading, consent state, and component lifecycle on both routes. In a single-page application, the custom button may be remounted without its listener, or a route transition may remove and recreate the vendor snippet.

Testing checklist before publishing the button

  • Activate the control with a mouse, keyboard, and touch input.
  • Confirm the button has a visible focus state and an understandable accessible name.
  • Test a fresh visitor session and a session with an existing conversation.
  • Test with the default launcher visible and, if applicable, with it hidden.
  • Check desktop and narrow mobile layouts for overlap with the widget, cookie banner, or navigation.
  • Reload the page and verify the button still works after the widget script loads.
  • Navigate between several routes in your single-page application and click the control once on each route.
  • Check the browser console and network panel for blocked scripts, undefined APIs, or policy errors.
  • Verify that closing the widget leaves the custom button usable for reopening it.
  • Confirm that opening chat does not submit a surrounding form or navigate away from the page.

How to choose the implementation for your site

Choose the default launcher when simplicity is the priority

Use the provider’s built-in control when you do not need a page-specific call to action and want the vendor to manage launcher behavior. This minimizes custom JavaScript and reduces the number of states your team must test.

Choose a custom Zendesk button when placement is part of the customer journey

A custom button is useful beside pricing questions, order-help content, account controls, or a support call to action. Select the command that matches Messaging or Classic, and decide whether the widget can be hidden before the click.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Choose an Intercom custom launcher when Messenger is already your support surface

Use the element ID or class supported by your Intercom account so the existing Messenger opens from your site’s design. Keep the account-specific configuration instructions available for future Messenger changes.

Keep a fallback destination for critical support flows

If chat availability depends on business hours, consent, authentication, or network conditions, provide a normal support-page link near the button. A meaningful fallback helps visitors when JavaScript or the hosted widget is unavailable.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What this integration does—and does not do

A custom launcher changes how visitors open an already installed widget. It does not install the provider, create agent availability, configure routing, authenticate a user, or guarantee that a conversation starts. Those behaviors remain controlled by the provider’s account settings and the widget’s own APIs.

The command also does not make every provider compatible with the same code. Zendesk Messaging, Zendesk Classic, and Intercom expose different configuration models, so keep provider-specific code isolated and documented in your site codebase.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can I open chat from an anchor link instead of a button?

You can, but a button is the correct semantic control when the action opens an interface rather than navigates to a new document. If you must use a link for a no-JavaScript fallback, give it a real support destination and progressively enhance it with the widget action.

Why does the same click command work for Zendesk Messaging but not Classic?

The products use different API namespaces. Messaging listens under messenger, while Web Widget (Classic) listens under webWidget. Confirm the generation in the installation or admin settings before changing code.

Do I need both show and open?

Only when the widget may be hidden. show controls visibility and open controls the panel. If the widget remains visible by default, the open call alone is generally sufficient.

Will opening the widget start a new support conversation?

No. Opening displays the messenger in its current state. Starting a new conversation is a separate provider action and should be implemented only with the relevant product API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I use the same JavaScript snippet for Intercom?

No. Intercom’s custom-launcher approach associates a configured element ID or class with Messenger. Follow the current instructions in the Intercom account rather than calling Zendesk’s zE function.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

What should I do if the widget script loads slowly?

Use the provider’s documented asynchronous loading or readiness method and ensure the click cannot call an unavailable API. Avoid relying on an arbitrary delay, because network and consent timing vary between visitors.

Why is the widget open but invisible?

Check whether it was hidden, whether a consent tool prevented its script from loading, and whether site CSS or an overlay is covering it. For Zendesk, call the appropriate show method before opening when your code previously hid the widget.

Frequently Asked Questions

Can I open chat from an anchor link instead of a button?

You can, but a button is the correct semantic control when the action opens an interface rather than navigates to a new document. If you must use a link for a no-JavaScript fallback, give it a real support destination and progressively enhance it with the widget action.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does the same click command work for Zendesk Messaging but not Classic?

The products use different API namespaces. Messaging listens under messenger, while Web Widget (Classic) listens under webWidget. Confirm the generation in the installation or admin settings before changing code.

Do I need both show and open?

Only when the widget may be hidden. show controls visibility and open controls the panel. If the widget remains visible by default, the open call alone is generally sufficient.

Will opening the widget start a new support conversation?

No. Opening displays the messenger in its current state. Starting a new conversation is a separate provider action and should be implemented only with the relevant product API.

Can I use the same JavaScript snippet for Intercom?

No. Intercom’s custom-launcher approach associates a configured element ID or class with Messenger. Follow the current instructions in the Intercom account rather than calling Zendesk’s zE function.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What should I do if the widget script loads slowly?

Use the provider’s documented asynchronous loading or readiness method and ensure the click cannot call an unavailable API. Avoid relying on an arbitrary delay, because network and consent timing vary between visitors.

Why is the widget open but invisible?

Check whether it was hidden, whether a consent tool prevented its script from loading, and whether site CSS or an overlay is covering it. For Zendesk, call the appropriate show method before opening when your code previously hid the widget.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.