Gossamer Forum
Home : General : Internet Technologies :

javascript question

Quote Reply
javascript question
hi

What I want to do is print the URL of the window that's currently open by clicking on a link in my bookmarks bar. If the user has a few windows open as tabs in their browser, it should print the one that's currently being viewed or in front.

By clicking directly on this bookmarkt it means there is effectively no referring URL, and the history doesn't apply either (I don't think?).

This is what I've got which pops up the window but the href is coming up as undefined...

Code:

javascript:{void( prompt( document.write( window.location.href ) ,''))}

Can anyone help with this one?

Regan
Subject Author Views Date
Thread javascript question ryel01 9169 Aug 24, 2005, 3:46 AM
Thread Re: [ryel01] javascript question
ryel01 8958 Aug 24, 2005, 4:49 AM
Thread Re: [ryel01] javascript question
Andy 8979 Aug 24, 2005, 7:51 AM
Thread Re: [Andy] javascript question
ryel01 8953 Aug 24, 2005, 2:04 PM
Thread Re: [ryel01] javascript question
Andy 8962 Aug 24, 2005, 10:34 PM
Thread Re: [Andy] javascript question
ryel01 8955 Aug 24, 2005, 10:54 PM
Thread Re: [ryel01] javascript question
Andy 8979 Aug 24, 2005, 11:57 PM
Thread Re: [Andy] javascript question
ryel01 8941 Aug 25, 2005, 1:36 AM
Thread Re: [ryel01] javascript question
Andy 8973 Aug 25, 2005, 1:38 AM
Thread Re: [Andy] javascript question
ryel01 8976 Aug 25, 2005, 1:40 AM
Post Re: [ryel01] javascript question
Andy 8944 Aug 25, 2005, 1:58 AM
Post Re: [ryel01] javascript question
Alex 8886 Aug 29, 2005, 11:05 AM