HTML Live No Change

It was done in XAMPP (local), but I turned it over to infinity free and made it all right, but it doesn’t work.

Code:

<div class="popup default-pop" id="infoPopup" style="display: none; opacity: 1;">
        <div class="inner">
            <p>
                <ul>
                    <li id="pop-message"></li>
                </ul>
            </p>
            <div class="btn-box">
                <button onclick="toggle(false)" id="check_1" class="btn-basic btn-confirm btn-close locales_confirm" >confirm</button>
                <button id="cancel_button" type="button" style="display: inline-block;" class="btn-basic btn-cancel btn-close locales_cancel" onclick="toggle(false)">Cancel</button>
            </div>
        </div>
    </div>

java-script
 function toggle(bool = true, message = "not message", button_cancel = false, button_check = false, onclick = () => {}) {
    const button = document.getElementById('check_1');
    //  Clear
    button.onclick = function() {
        toggle(false)
    };
   
    document.getElementById('infoPopup').style.display = bool ? "block" : "none";
    document.getElementById('pop-message').innerHTML = message;
    document.getElementById('cancel_button').style.display = button_cancel ? "inline-block" : "none";
    if (button_check) { // check click
    
        button.onclick = function() {
            check(onclick);
        };
     
    }
}

The on-click part cannot be changed.

What’s your site’s URL?

8 Likes

Your javascript part seems incorrect - JS has to be contained inside of tags, excluding if it’s in a different file. I don’t have much knowledge of it but it doesn’t seem like it’s formatted correctly.

Can you see any errors in DevTools (f12 in browser)?

6 Likes

Is it actually stored as a .html file? If so, it’s possible you’re not seeing the changes because your browser is serving you an older, cached version of the page.

You can verify this by checking the page in your browser’s Incognito Mode. That mode is very useful because it bypasses all browser caches.

4 Likes

I can’t show it because it’s Korean, not English.

No error is displayed.

Server.js
It is saved in format.

A .js file is also static, so the same applies.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.