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 9048 Aug 24, 2005, 3:46 AM
Thread Re: [ryel01] javascript question
ryel01 8839 Aug 24, 2005, 4:49 AM
Thread Re: [ryel01] javascript question
Andy 8859 Aug 24, 2005, 7:51 AM
Thread Re: [Andy] javascript question
ryel01 8834 Aug 24, 2005, 2:04 PM
Thread Re: [ryel01] javascript question
Andy 8843 Aug 24, 2005, 10:34 PM
Thread Re: [Andy] javascript question
ryel01 8836 Aug 24, 2005, 10:54 PM
Thread Re: [ryel01] javascript question
Andy 8860 Aug 24, 2005, 11:57 PM
Thread Re: [Andy] javascript question
ryel01 8821 Aug 25, 2005, 1:36 AM
Thread Re: [ryel01] javascript question
Andy 8854 Aug 25, 2005, 1:38 AM
Thread Re: [Andy] javascript question
ryel01 8855 Aug 25, 2005, 1:40 AM
Post Re: [ryel01] javascript question
Andy 8826 Aug 25, 2005, 1:58 AM
Post Re: [ryel01] javascript question
Alex 8768 Aug 29, 2005, 11:05 AM