Skip to main content

Fixing Slow or Delayed Time-Selection Dropdown on Custom Registration Pages

Troubleshoot and fix slow-loading webinar time dropdowns on custom registration pages built with Unbounce, WordPress, Webflow, or other page builders.

Updated today

Overview

If visitors to your registration page experience a noticeable delay before webinar times appear in the dropdown — or the dropdown appears empty at first — this is almost always caused by how your page loads the time-selection script. This guide explains the root cause and provides a quick fix.

Symptoms

  • The time-selection dropdown appears empty for several seconds after the page loads

  • Visitors think no times are available and leave the page

  • The dropdown eventually populates, but only after all images and assets finish loading

  • The issue is more noticeable on pages with large images or many assets (common with Unbounce, WordPress, etc.)

The screenshot below shows the registration form with the time-selection dropdown (1). When the script loads slowly, this dropdown appears empty for several seconds:

AEvent registration form highlighting the time-selection dropdown that can load slowly on heavy pages

Root Cause

The most common cause is using window.onload in the script that populates the dropdown. window.onload waits for everything on the page to finish loading — every image, stylesheet, font, and video — before it runs your dropdown code.

On pages with heavy assets, this can add 3–10+ seconds of delay before the dropdown times appear.

The Fix: Use DOMContentLoaded Instead

DOMContentLoaded fires as soon as the page structure (HTML) is ready, without waiting for images and other assets. This means your dropdown populates almost instantly.

You can find your registration code in your AEvent campaign under Settings → Code. In the screenshot below, click Code in the sidebar (1), then find the Form Registration Code section (2) in the left panel — this is where you'll make the change:

AEvent campaign Code tab with numbered steps showing the sidebar Code navigation and Form Registration Code section

Before (slow):

<script>window.onload = function() {    var newOptions = {        "####{{!reg-dayofweek1}}, ####{{!reg-month1}} ####{{!reg-dayofmonth1}} -####{{!reg-timeZone1}}": "####{{!webinar-webinar1id}}",        "####{{!reg-dayofweek2}}, ####{{!reg-month2}} ####{{!reg-dayofmonth2}} -####{{!reg-timeZone2}}": "####{{!webinar-webinar2id}}",        "####{{!reg-dayofweek3}}, ####{{!reg-month3}} ####{{!reg-dayofmonth3}} -####{{!reg-timeZone3}}": "####{{!webinar-webinar3id}}"    };    var $el = $("#webinarid");    $.each(newOptions, function(key, value) {        $el.append($("<option></option>")            .attr("value", value).text(key));    });};</script>

After (fast):

<script>document.addEventListener("DOMContentLoaded", function() {    var newOptions = {        "####{{!reg-dayofweek1}}, ####{{!reg-month1}} ####{{!reg-dayofmonth1}} -####{{!reg-timeZone1}}": "####{{!webinar-webinar1id}}",        "####{{!reg-dayofweek2}}, ####{{!reg-month2}} ####{{!reg-dayofmonth2}} -####{{!reg-timeZone2}}": "####{{!webinar-webinar2id}}",        "####{{!reg-dayofweek3}}, ####{{!reg-month3}} ####{{!reg-dayofmonth3}} -####{{!reg-timeZone3}}": "####{{!webinar-webinar3id}}"    };    var el = document.getElementById("webinarid");    Object.entries(newOptions).forEach(function([key, value]) {        var option = document.createElement("option");        option.value = value;        option.textContent = key;        el.appendChild(option);    });});</script>

What changed:

  • window.onloaddocument.addEventListener("DOMContentLoaded", ...) — runs as soon as the HTML is parsed, not after all assets load

  • Removed jQuery dependency ($) — uses plain JavaScript instead, which means one fewer script to load

Bonus: Move the AEvent Header Script into the <head>

If your page builder allows it (Unbounce, WordPress, Webflow all do), place the AEvent registration header script in the <head> section of the page rather than the body. This allows the script to start loading earlier, further reducing any delay.

Where to find the header script: In your AEvent campaign, go to Settings → Code (step 1 in the screenshot above), then look for the Header Script panel on the right side of the same page.

Page Builder-Specific Notes

Unbounce

  • Add the updated script as a JavaScript element on the page (same as before — just replace the code)

  • For the header script: go to your page's JavaScript settings and set placement to "Head"

WordPress

  • If using a theme or plugin that lets you add custom scripts, place the header script in the Header Scripts area

  • Add the dropdown script in a Custom HTML block or your theme's footer scripts

Webflow

  • Go to Project Settings → Custom Code → Head Code for the header script

  • Add the dropdown script in the page's Before </body> tag custom code area

Still Slow?

If you've made both changes and the dropdown is still slow:

  1. Check your page speed — use Google PageSpeed Insights to see if large images or other assets are slowing things down

  2. Verify the script is running — open your browser's Developer Tools (F12), go to the Console tab, and look for any JavaScript errors

  3. Contact support — reach out to us via chat and include a link to your registration page so we can investigate

Did this answer your question?