Re: open URL in the current tab

Discussion in 'Python' started by Chris Angelico, Dec 10, 2012.

  1. On Tue, Dec 11, 2012 at 9:27 AM, Jabba Laci <> wrote:
    > Hi,
    >
    > With the webbrowser module you can open a URL in a new tab. But how
    > could I tell Firefox from Python to open a URL in the _current_ tab?


    If this is for use on somebody else's system, *please don't*. My
    current tab is my business, not your program's. But if this is your
    own system (eg you want to use Firefox as your GUI), there are a few
    options. The easiest, I think, is to have the previous page handle the
    transition - trigger it in some way, and then it simply does:

    location.href = "some_new_url"

    How you go about triggering this is the next problem :) But that
    depends hugely on what you're trying to accomplish.

    ChrisA
    Chris Angelico, Dec 10, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jabba Laci

    open URL in the current tab

    Jabba Laci, Dec 10, 2012, in forum: Python
    Replies:
    0
    Views:
    115
    Jabba Laci
    Dec 10, 2012
  2. Joel Goldstick

    Re: open URL in the current tab

    Joel Goldstick, Dec 10, 2012, in forum: Python
    Replies:
    0
    Views:
    110
    Joel Goldstick
    Dec 10, 2012
  3. Boris FELD

    Re: open URL in the current tab

    Boris FELD, Dec 10, 2012, in forum: Python
    Replies:
    0
    Views:
    118
    Boris FELD
    Dec 10, 2012
  4. Jabba Laci

    Re: open URL in the current tab

    Jabba Laci, Dec 10, 2012, in forum: Python
    Replies:
    0
    Views:
    123
    Jabba Laci
    Dec 10, 2012
  5. Jabba Laci

    Re: open URL in the current tab

    Jabba Laci, Dec 11, 2012, in forum: Python
    Replies:
    0
    Views:
    113
    Jabba Laci
    Dec 11, 2012
Loading...

Share This Page