Skip to content

Unnecessary http request happening when applying template inside ajax success request #195

Description

@maityutpal

I am using this plugin in my project. It is working fine but when applying templating inside a ajaxcall success response it is calling an unknown http url https://xxxxxxxx.azurewebsites.net/class=%22%22 like this

My template is defined like this way

<script id="app-list-filter-template" type="text/x-jQuery-tmpl">
    <li class="nav-item mb-3 me-3 app-content app-contents {{if IsSelected == true}} selected {{/if}}" data-appid="${AppId}" data-iscloud="${IsCloud}" data-versionid="${AppVersionId}">

        <a class="nav-link d-flex flex-column app-contents overflow-hidden  w-100px h-100px py-4" data-bs-toggle="pill">

            <div class="nav-icon">
                <img alt="" src=${IconPath} class="">
            </div>
            <span class="nav-text app-name">${AppName}</span>
            <span class="nav-text text-gray-700 app-version-name ">${AppVersionNumber}</span>
            <span class="bullet-custom position-absolute bottom-0 w-100 h-4px bg-primary"></span>

        </a>
    </li>
</script>

And in success applying templating like this way

success: function (responseData) {

                    if (responseData.Status) {
                        OnBoarding.appList = responseData.Value;
                        $('#onboarding-app-list').html('');
                        $("#app-list-filter-template").tmpl(responseData.Value).appendTo("#onboarding-app-list");
                        if (OnBoarding.blockui.isBlocked()) {
                            OnBoarding.blockui.release();
                        }
                        event.preventDefault();
                        event.stopPropagation();
                        return true;
                    }


                }

When I am commenting the templating code inside ajax success that unknown http url call is not happening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions