Back button behaviour on search form submit

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Back button behaviour on search form submit

This topic contains 6 replies, has 2 voices, and was last updated by tjldesigns tjldesigns 5 months, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #39245
    tjldesigns
    tjldesigns
    Participant

    Hello Ernest,

    I hope you’re well :).

    I have a tricky one which I’m not sure can be solved, but wanted to ask as the client has raised it.

    Basically if you go here: https://wfw.temporarywebsiteaddress.com/insights/ and search for say ‘wfw’ in the search box, then hit enter or click the magnifying glass icon, to submit it, then click on a result, then click back from there, to hopefully go back to the results you have before, it instead goes to a resubmit the form message.

    You can also see exactly what I mean here in this screenshare video: https://watch.screencastify.com/v/hMDCxC3iTOjLaDPkIUZb

    Is there any way to allow the user to go back without getting the submit form message at all, and instead just go back to the search results?

    Many thanks as always :),
    Tonya

    #39251
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tonya,

    It is great to hear from you again 🙂

    This happens, because the search override method is set to “POST” insteady of the default “GET”. I see you have a custom search page, so you may not need to have the override enabled at all. If the override is needed, then switch to the GET method, that does not need form submission.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #39254
    tjldesigns
    tjldesigns
    Participant

    Hi Ernest,

    Thanks so much for your quick help as always :).

    So I have just checked the settings and those already all seem ok (please see attached) or am I missing something maybe?

    Many thanks again for your help,
    Tonya

    Attachments:
    You must be logged in to view attached files.
    #39260
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh, I missunderstood you. I thought it happens right after the search redirection. The clicks on the results page are not affected by ajax search pro, that is definitely caused by a different script. Try disabling the plugins one by one to see if that changes anything, usually that is the quickest way to find the cause of the issue.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #39355
    tjldesigns
    tjldesigns
    Participant

    Hi Ernest,

    Thank you for your quick reply as always and sorry for my delay, everything has been a little hectic due to the passing of our lovely Queen, so just catching up.

    So on this one, if you watch my screen recording, and replicate my exact steps, I wonder if this is just browser behaviour on form submission and then hitting the back button, and it may be just something we can’t actually do anything about? As I don’t think a plugin is the issue, can you see what I mean :).

    Many thanks again,
    Tonya

    #39361
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I can’t imagine. The whole world was in shock.

    Anyways, I doubt it is a browser behavior. This is more likely a script event handler – something might be attached to a result click, which triggers a form submission. Clicking then “back”, will try to trigger the submission again, but the browser wants to make sure it was intended. Althought I am not an expert in this area, but this is more likely in my opinion.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #39525
    tjldesigns
    tjldesigns
    Participant

    Sorry for my late reply Ernest, I got pulled away on another urgent project frustratingly, but I just wanted to say thank you so much as always for your feedback, and I understand totally what you mean, that was my totally bad explaining, as yes something is re-submitting the form, so we just need to see what we can do on that. Thanks so much again :).

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

You must be logged in to reply to this topic.