Forum: Bug Reports

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

[Resolved]Gmw.js not working

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #50422
    bux
    Member

    Hi,
    I would like that when click the submit button in a form it automatically redirect me to a specific page. I have tried editing the form, but it always take me to homepage. I have also tried to add “window.location.replace(‘http://google.it’);” in gmw.js like this:
    //when click on an HTML submit button submit the form
    $(‘.gmw-submit’).click(function(e) {
    var target = $( e.target );
    if ( !target.is( “input” ) ) {
    window.location.replace(‘http://google.it’);
    }
    but it doesn’t work.
    The strange thing is that if I remove all javascript files (like gmw.js e.g.) the form continue working normally.
    The site where I’m testing it is http://pizzabux.it
    Thanks.

    N.B. Now the php for the form is [gmw form=”1″], but I have tried also with [gmw search_form=”1″] and search result in another page, but it takes me always to homepage.

    #50429
    bux
    Member

    I add that if I put window.location.replace(‘http://google.it’); after var place = autocomplete.getPlace(); in googleAddressAutocomplete.js it works when I click on autocomplete text. But my goal is to been redirected when I press the submit button

    #50430
    bux
    Member

    I have partially solved my problem adding a scroll at the end of results.php
    lines I have added are:
    <script type=”text/javascript”>
    window.scrollTo(0,document.body.scrollHeight);
    </script>

    but when I have no results (obviously) it doesn’t scroll down, and also adding those lines in no-results.php file won’t help.
    How can I do?

    #52704

    Hello Bux,
    I apologize, but I just saw this topic of yours.

    Do you still need help with the above?

    #52806

    This topic marked “Resolved” due to inactivity. If you wish to reply to this topic please change its status to “Not resolved”  before replying.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.