$(document).ready(function () {
    $('#widget').on('change', function () {
        $.ajax({
            type: 'post',
            url: './includes/post_webview_rtxsport.php',
            data: { 
                post_rtxsport: 1,
                widget: $(this).val()
            },
            success: function (response) {
                location.reload(); // Reload the page
            },
            error: function(xhr, status, error) {
                console.error('AJAX error:', error);
            }
        });
    });
});
