This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Disable Ajax load

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #7453
    Alexander VinnikAlexander Vinnik
    Participant

    Hello

    I need:
    – when user click on “try this” keyword it redirects right to search results page;
    – when user enters some keyword in search filed and click “Enter” or on “Search icon” it opens a search results page;

    How to do this?;

    #7457
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    2. You can enable that on the General Options -> Behavior panel: http://i.imgur.com/rUaziJ7.png

    1. There is no option to redirect the “try this” keywords to the results page, however you can use this code snippet, if you have the option above enabled:

    [html]<script>
    var _scope = ASP.getScope();
    _scope(function($) {
    $("p.asp-try a").click(function(){
    setTimeout(function(){
    var e = $.Event( "keyup", { which: 13 } );
    $("input.orig").trigger(e);
    }, 400);
    });
    });
    </script>[/html]

    You can put this in your active themes folder, into the footer.php file, just before the closing body tag.

    #7488
    Alexander VinnikAlexander Vinnik
    Participant

    Thanks,
    How to make it work on mobile version as it works only on desktop version?

    #7503
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Maybe try to change the script to:

    [html]<script>
    var _scope = ASP.getScope();
    _scope(function($) {
    $("p.asp-try a").click(function(){
    setTimeout(function(){
    $("div.promagnifier").click();
    }, 400);
    });
    });
    </script>[/html]

    #7516
    Alexander VinnikAlexander Vinnik
    Participant

    It helped, thanks!
    Another question, how to change the font size of “try this” keywords?

    #7518
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You can try a custom CSS code for that, something like:

    [html]
    p.asp-try a {
    font-size: 18px !important;
    }
    [/html]

    That should do the trick.

    #7519
    Alexander VinnikAlexander Vinnik
    Participant

    Thank you for fast reply!

    #7527
    Alexander VinnikAlexander Vinnik
    Participant

    Hi

    I have a few issues:

    1. The script you provided for mobile version:
    [code]
    &lt;script&gt;
    var _scope = ASP.getScope();
    _scope(function($) {
    $("p.asp-try a").click(function(){
    setTimeout(function(){
    $("div.promagnifier").click();
    }, 400);
    });
    });
    &lt;/script&gt;
    [/code]

    does not work properly, when I save my footer.php file and load my webpage it works only for several searches after that it does not work as it should – it does not redirects to search results but make an ajax search instead;

    2. Also I need this search results to open in a new page;

    #7528
    Alexander VinnikAlexander Vinnik
    Participant

    BTW actually this one:
    “2. Also I need this search results to open in a new page;”

    is not needed for now, just need to resolve the 1st issue

    #7538
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    It’s already a customization workaround, unfortunately I cannot guarantee it’s going to work.

    You can try one more thing, maybe lowering the timeout value down to 50, and combining with the previous solution.

    First possibility:

    [html]<script>
    var _scope = ASP.getScope();
    _scope(function($) {
    $("p.asp-try a").click(function(){
    setTimeout(function(){
    $("div.promagnifier").click();
    var e = $.Event( "keyup", { which: 13 } );
    $("input.orig").trigger(e);
    }, 50);
    });
    });
    </script>[/html]

    Second possibility:

    [html]<script>
    var _scope = ASP.getScope();
    _scope(function($) {
    $("p.asp-try a").click(function(){
    setTimeout(function(){
    $("div.promagnifier").click();
    }, 50);
    });
    });
    </script>[/html]

    One of them might work correctly, I’m betting on the first one.

    #7544
    Alexander VinnikAlexander Vinnik
    Participant

    Unfortunately it does not help:(

    #7545
    Alexander VinnikAlexander Vinnik
    Participant

    if there is no other solutions maybe as an alternate to make this:

    only for mobile version (if possible?): when you click on try this keyword it just fills the search input with this keyword and then I can click on search button and it opens a search results

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.