Is it possible to get the text from browser location bar *before*navigation (e.g. not location.href)

Discussion in 'Javascript' started by Alex Bird, May 8, 2008.

  1. Alex Bird

    Alex Bird Guest

    Hi,
    Possibly I am searching for the wrong thing, but my googling has been
    futile.

    I want to get the contents of the browser (FF) location bar *before* I
    have navigated to that location. location.href / window.location have
    not been set at this point.

    Scenario: I want to be able to paste an address in, and hit a button
    to change certain parameters and navigate to the page. I can do this
    by popping up a dialogue box and pasting the address in, but that
    isn't very clean, and precludes having several modifier bookmarklets.

    This could help my debugging speed immensely!

    Cheers
    Alex Bird, May 8, 2008
    #1
    1. Advertising

  2. Alex Bird wrote:
    > Possibly I am searching for the wrong thing, but my googling has been
    > futile.


    A quite pointless statement without telling what keywords you have used.

    > I want to get the contents of the browser (FF) location bar *before* I
    > have navigated to that location. location.href / window.location have
    > not been set at this point.


    You can't. This code would run in the sandbox which, literally, prevents
    you from spying on the property.

    > Scenario: I want to be able to paste an address in, and hit a button
    > to change certain parameters and navigate to the page. I can do this
    > by popping up a dialogue box and pasting the address in, but that
    > isn't very clean, and precludes having several modifier bookmarklets.


    I don't follow. As you can paste the address and hit a button, you can type
    the keyword of the bookmarklet and paste the address as its parameter. You
    can have any number of modifier bookmarklets this way. I currently use
    about 100 of them.


    HTH

    PointedEars
    --
    Prototype.js was written by people who don't know javascript for people
    who don't know javascript. People who don't know javascript are not
    the best source of advice on designing systems that use javascript.
    -- Richard Cornford, cljs, <f806at$ail$1$>
    Thomas 'PointedEars' Lahn, May 8, 2008
    #2
    1. Advertising

  3. Alex Bird

    Alex Bird Guest

    On May 8, 6:35 pm, Thomas 'PointedEars' Lahn <>
    wrote:
    > Alex Bird wrote:
    > > Possibly I am searching for the wrong thing, but my googling has been
    > > futile.

    >
    > A quite pointless statement without telling what keywords you have used.


    You're weird.

    Thanks for answering the question though,

    A.
    Alex Bird, May 8, 2008
    #3
  4. Alex Bird wrote:
    > [...] Thomas 'PointedEars' Lahn [...] wrote:
    >> Alex Bird wrote:
    >>> Possibly I am searching for the wrong thing, but my googling has been
    >>> futile.

    >> A quite pointless statement without telling what keywords you have used.

    >
    > You're weird.


    In this place, you are. See http://catb.org/~esr/faqs/smart-questions.html

    > Thanks for answering the question though,


    You're welcome.


    PointedEars
    --
    var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
    Thomas 'PointedEars' Lahn, May 9, 2008
    #4
    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. Matt
    Replies:
    0
    Views:
    3,529
  2. John Hann
    Replies:
    0
    Views:
    6,048
    John Hann
    Aug 21, 2004
  3. Eswa
    Replies:
    0
    Views:
    361
  4. saiho.yuen
    Replies:
    3
    Views:
    411
    kaeli
    Sep 14, 2004
  5. Replies:
    2
    Views:
    445
Loading...

Share This Page