• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Open a URL in same window / tab

    Opera for Windows
    5
    13
    2963
    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.
    • TrulsF
      TrulsF last edited by

      How can I open a URL in same window / tab?
      I am using Dropbox, and for each file there I can obtain a Dropbox link like "https://www.dropbox.com/s/xxxxxxxxxxx/yyyyy.pdf?dl=0".
      This link results in that the file opens in a new window / tab.
      Is there a way I can modify this url so that it opens in the same window / tab?

      Reply Quote 0
        alobpreis 1 Reply Last reply
      • alobpreis
        alobpreis @TrulsF last edited by alobpreis

        Whether a link is opened in the same tab or not it's AFAIK up to the current page's html code. If you want a link to open in a new tab, you have to include target="_blank" in the a href tag. I don't think the link itself has any relation to this behavior. Where are these links exactly?

        You can do some tests of the above here:
        https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_a_target

        I did and after removing the target attribute, the link opened right there.

        Reply Quote 0
          TrulsF 1 Reply Last reply
        • TrulsF
          TrulsF @alobpreis last edited by

          @alobpreis Thank you for looking into my case.
          I realize I must be more precise.
          I use an Excel spreadsheet that contains the code. When I save it as pdf (not print to pdf) the resulting pdf contains valid url's.
          You can see it all live here (link obtained from Dropbox): https://www.dropbox.com/s/plkk5pnde9b1qw6/101.pdf?dl=0
          On this page you will see two red arrow-fields up and down. You will also find a red line in the lower part pointing at other information.
          If I click on either of these three, the next page opens in a new window / tab. My hope is to find a solution to open them in the same window / tab, so that I don't consume too many windows / tabs.

          Reply Quote 0
            alobpreis 1 Reply Last reply
          • alobpreis
            alobpreis @TrulsF last edited by alobpreis

            Oh, then it's a bit tricky because what you have there is the PDF reader inside Dropbox, and that reader converts PDF links to html that opens in a new tab. For example:

            <a aria-label="External link" href="https://www.dropbox.com/s/15vfmbaoldh8llp/R1101.pdf?dl=0" rel="noreferrer noopener" target="_blank" style="position: absolute; bottom: 76.584px; left: 53.4px; width: 580.06px; height: 12.48px;"></a>
            

            Note -of course- the target="_blank" there.

            Normally I'd say you can't do anything, because that's how Dropbox and its PDF reader work, but you could try modifying the html either by manually running some Javascript, or maybe having a browser's extension which automatically runs your Javascript code.

            An example of such code using jQuery:

            $('a[href*="dropbox.com"]').attr('target', '')
            
            Reply Quote 0
              TrulsF 2 Replies Last reply
            • TrulsF
              TrulsF @alobpreis last edited by

              @alobpreis I understand that this is quite complicated, and since I cannot control the browsers of the users accessing my web I just have to leave it as it is. It works OK, and the only catch is that there might be some extra tabs to close for the users after they have finished using my web.

              Reply Quote 0
                1 Reply Last reply
              • TrulsF
                TrulsF @alobpreis last edited by

                @alobpreis I do have another issue in case you have the opportunity to help me.
                It is regarding the print options in Excel.
                I have a long spreadsheet consisting av around 150 sections.
                Each section contains all the information the I want to print, but for each section I only want to print a certain number of rows.
                This number varies for each section, but it is found within the data.
                I found a way to do this using the OFFSET and the Ctrl + F3 key (Name...) and combine this with modifying the Print Area.
                =OFFSET(INDIRECT("$A"&RankingDetails!$X21);0;0;INDIRECT("AD"&RankingDetails!W14)+1;18)
                But it very unstable in the way that if I try to automate it, it is easily disturbed if anything else happens on my computer.
                So my question is; do you know a way to print a spreadsheet, with header and footer, for any part of the spreadsheet, limited by start row and number of rows?

                Reply Quote 0
                  leocg alobpreis 2 Replies Last reply
                • leocg
                  leocg Moderator Volunteer @TrulsF last edited by

                  @trulsf Different issue belongs to different topic.

                  Reply Quote 0
                    1 Reply Last reply
                  • alobpreis
                    alobpreis @TrulsF last edited by

                    @trulsf said in Open a URL in same window / tab:

                    @alobpreis I do have another issue in case you have the opportunity to help me.
                    It is regarding the print options in Excel.
                    ...

                    Are you asking about an Excel formula in a topic about a PDF link from within Opera? Kind of weird. ๐Ÿ˜† Unless it's related to Opera somehow, but I think it's not.

                    I don't have the answer, but I guess you should ask somewhere else, like in superuser.com (from the Stack Overflow platform).

                    Reply Quote 0
                      TrulsF 1 Reply Last reply
                    • TrulsF
                      TrulsF @alobpreis last edited by

                      @alobpreis Yes, You are correct. It is a totally different matter, and it does not belong to this case. Thank you anyway. I have really appreciated your efforts.

                      Reply Quote 0
                        1 Reply Last reply
                      • burnout426
                        burnout426 Volunteer last edited by

                        An Opera/Chrome user can drag the link upwards and drop it on the current tab in the tab bar and it won't open in a new tab.

                        Users of browsers that support extensions can use an extension like https://chrome.google.com/webstore/detail/death-to-blank/gneobebnilffgkejpfhlgkmpkipgbcno/related to remove target="_blank" so the links open in the current tab.

                        I'm assuming Dropbox doesn't support anything for Dropbox pdf URLs in the query string like https://www.dropbox.com/s/plkk5pnde9b1qw6/101.pdf?dl=0&sametab=1. But, you can search the net to see if any thing comes up.

                        Reply Quote 0
                          TrulsF 1 Reply Last reply
                        • TrulsF
                          TrulsF @burnout426 last edited by

                          @burnout426 said in Open a URL in same window / tab:

                          Thank you for the tip "drag the link upwards and drop it".
                          This worked very fine.
                          For the moment I just have to accept that there are no other ways.

                          Reply Quote 0
                            1 Reply Last reply
                          • Mrfaann2
                            Mrfaann2 Banned last edited by

                            what a silly question!....๐Ÿคจ

                            Reply Quote 0
                              TrulsF 1 Reply Last reply
                            • TrulsF
                              TrulsF @Mrfaann2 last edited by

                              @mrfaann2 Can you please tell me what is silly about it?

                              Reply Quote 0
                                1 Reply Last reply
                              • Locked by  leocg leocg 
                              • Locked by  leocg leocg 
                              • First post
                                Last post

                              Computer browsers

                              • Opera for Windows
                              • Opera for Mac
                              • Opera for Linux
                              • Opera beta version
                              • Opera USB

                              Mobile browsers

                              • Opera for Android
                              • Opera Mini
                              • Opera Touch
                              • Opera for basic phones

                              • Add-ons
                              • Opera account
                              • Wallpapers
                              • Opera Ads

                              • Help & support
                              • Opera blogs
                              • Opera forums
                              • Dev.Opera

                              • Security
                              • Privacy
                              • Cookies Policy
                              • EULA
                              • Terms of Service

                              • About Opera
                              • Press info
                              • Jobs
                              • Investors
                              • Become a partner
                              • Contact us

                              Follow Opera

                              • Opera - Facebook
                              • Opera - Twitter
                              • Opera - YouTube
                              • Opera - LinkedIn
                              • Opera - Instagram

                              © Opera Software 1995-