Navigation

    Quasar Framework

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

    openURL in current tab

    Help
    3
    7
    31
    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.
    • C
      codino last edited by

      Hope you all had a nice weekend! I am currently working on a project where I want to have q-btns link to external urls.

      I want the new URL to replace the current page and not open in a new tab. I first tried wrapping it in <a> using href, but it changed the CSS of the button and made it look bad. I also tried importing openURL, but it seems like it only opens URLs in new tabs.

      If it’s possible, what would be the best way to have a button link to an external URL and replace the current page with that link? Can this be done with changing something with openURL?

      Thanks so much! I appreciate the help 😁

      1 Reply Last reply Reply Quote 0
      • J
        jadedRepublic last edited by jadedRepublic

        <q-btn type="a" href="https://quasar.dev/">Quasar</q-btn>
        
        J 1 Reply Last reply Reply Quote 1
        • J
          JSONK @jadedRepublic last edited by

          @jadedRepublic I tried every combination you listed with no luck. It’s really strange that changing the second argument isn’t working though. Seems like that should have been the fix to it

          J 3 Replies Last reply Reply Quote 0
          • J
            jadedRepublic @JSONK last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • J
              jadedRepublic @JSONK last edited by jadedRepublic

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • J
                jadedRepublic @JSONK last edited by

                @JSONK I’ve removed all my previous suggestions as It was getting confusing, my original suggestion for using a button does what you need It to do. I just got tag & type mixed up.

                <q-btn type="a" href="https://quasar.dev/">Quasar</q-btn>
                
                J 1 Reply Last reply Reply Quote 1
                • J
                  JSONK @jadedRepublic last edited by

                  @jadedRepublic That worked, thank you! I appreciate the help 😃

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post