Inhalte aufrufen

Profilbild

Customizing landing page is causing search function is disable

landing page

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
1 Antwort zu diesem Thema

#1 arifin.wm

arifin.wm

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 33 Beiträge

Geschrieben: 04 December 2016 - 06:44

Dear All,

 

I'm adding landing page in my index and it will pop up automatically on page load. I don't know why it's causing my instant search function could not function again.

Here I'm attaching my code in index.mobile.html. Please advise is it blocked by my landing page script ?

 

Best Regards,

Afin

@{
    Layout = "~/Views/Shared/_Root.cshtml";
}

<script type="text/javascript" src="~/Scripts/contentslider/jquery-1.11.3.min.js"></script>

<style>
   #overlay {
        display: block;
        position: fixed;
        top: 0%;
        left: 0%;
        width: 100%;
        height: 100%;
        background-color: black;
        z-index: 1001;
        -moz-opacity: 0.8;
        opacity: .80;
        filter: alpha(opacity=80);
    }

    #popup {
        display: none;
        position: absolute;
        top: 25%;
		left:25%;
        width: 350px;
        height: 300px;
        background-color: #F1F1F1;
        z-index: 1002;
        overflow: auto;
    }
</style>



<div class="page home-page">
    <div class="page-body">
        @Html.Widget("mobile_home_page_top")
        @*product search box*@
        @Html.Action("SearchBox", "Catalog")
        @*logo*@
        <div class="homepage-logo">
            
        </div>

             
        <hr style="display:block; margin-top:0.5em; margin-bottom:0.5em; margin-left: auto; margin-right:auto; border-style:inset; border-width:1px;" />

        @*categories*@
        @*@Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = 0, currentProductId = 0 })*@
    
        @*manufacturers*@
        @Html.Action("ManufacturerNavigation", "Catalog", new { currentManufacturerId = 0 })
        @*home page products*@ @*uncomment the line below to show home page featured products*@
        @*@Html.Action("HomepageProducts", "Catalog")*@

        @*categories*@
        @*@Html.Action("HomepageBestSellers", "Catalog")*@

        <hr style="display:block; margin-top:0.5em; margin-bottom:0.5em; margin-left: auto; margin-right:auto; border-style:inset; border-width:1px;" />

        @Html.Widget("mobile_home_page_bottom")
    </div>    
</div>

<div id="popup">
    <form>
        <iframe style="width:340px;height:250px;frameborder:0;"
                src="http://tempuri/myweb.com"></iframe>

        <div style="text-align:center;">
            <input id="close" type="submit" value="Close" />
        </div>        
    </form>
</div>

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script>
      jQuery.fn.center = function () {
        this.css("position","absolute");
        this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
        this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
        return this;
      }

      $("form").on("submit", function(e){
        e.preventDefault();
        $("#popup, #overlay").hide();
        $.cookie("popup", "displayed", { expires: 7 });

        // Process subscription here
      });

      var hasSeenSignUpDialogie = $.cookie('popup');
      if(!hasSeenSignUpDialogie){
        $("<div>",{ id : "overlay" }).insertBefore("#popup");
        $("#popup").show().center();
      }

      $("button").on("click", function(){
        $.removeCookie('popup');
      }
      );
</script>


#2 arifin.wm

arifin.wm

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 33 Beiträge

Geschrieben: 05 December 2016 - 16:59

After several times, I got it.

The problem is on form. I need to remove the form in div pop up like below.

<div id="popup">   
        <iframe style="width:340px;height:250px;frameborder:0;"
                src="http://tempuri/myweb.com"></iframe>
 
        <div style="text-align:center;">
            <button id="close" onclick="closebutton()">Close</button>
        </div>        
    
</div>