• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

window.location.href = {{ route('shop.checkout.success') }};

Bug Report
4
5
487
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    shanavas last edited by shanavas 16 Jul 2020, 12:51 16 Jul 2020, 12:50

    window.location.href = {{ route('shop.checkout.success') }}; ErrorException (E_ERROR) htmlspecialchars() expects parameter 1 to be string, object given (View:

    How to fix this issue - Urgent Help

    1 Reply Last reply Reply Quote 0
    • V
      Vaishali Agarwal last edited by 17 Jul 2020, 05:50

      @shanavas
      communicating over this https://forums.bagisto.com/topic/1544/illuminate-contracts-container-bindingresolutionexception-target-class-encrypter-does-not-exist-previous-exceptions-class-encrypter-does-not-exist-1/23

      1 Reply Last reply Reply Quote 0
      • 3 years later
      • E
        eltonjorn last edited by 29 May 2023, 05:52

        USE:  window.location.replace('http://example.com');
        

        It’s better than using window.location.href = ‘http://example.com’;

        Using replace() is better because it does not keep the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco.

        • If you want to simulate someone clicking on a link, use window.location.href
        • If you want to simulate an HTTP redirect, use window.location.replace

        You can use assign() and replace methods also to javascript redirect to other pages like the following:

        location.assign("http://example.com");
        

        The difference between replace() method and assign() method(), is that replace() removes the URL of the current document from the document history, means it is not possible to use the “back” button to navigate back to the original document. So Use the assign() method if you want to load a new document, andwant to give the option to navigate back to the original document.

        1 Reply Last reply Reply Quote 0
        • A
          Amitk-Webkul last edited by 30 May 2023, 04:25

          Hi @eltonjorn,

          Thank you for the information.

          1 Reply Last reply Reply Quote 0
          • A
            Amitk-Webkul last edited by 30 May 2023, 04:27

            Hi @shanavas,

            You can do the same.

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post