<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: Bookmarklet that goes to a url and makes the referring url available as a variable for a script. </title>
      <link>http://ask.metafilter.com/19840/Bookmarklet-that-goes-to-a-url-and-makes-the-referring-url-available-as-a-variable-for-a-script/</link>
      <description>Comments on Ask MetaFilter post Bookmarklet that goes to a url and makes the referring url available as a variable for a script.</description>
	  	  <pubDate>Sun, 12 Jun 2005 22:36:32 -0800</pubDate>
      <lastBuildDate>Sun, 12 Jun 2005 22:36:32 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: Bookmarklet that goes to a url and makes the referring url available as a variable for a script. </title>
  	<link>http://ask.metafilter.com/19840/Bookmarklet-that-goes-to-a-url-and-makes-the-referring-url-available-as-a-variable-for-a-script</link>	
  	<description>I need a bookmarklet that goes to a specified (static) url and makes the url of the page I came from available as a variable for a perl or php script. I just want to be able to go to a page I&apos;ve set up and have it record the page I&apos;m got there from, but the apparently-useful-for-just-this-sort-of-thing http_referrer variable only works if i clicked on a link to get there, while I, in my hubris, would like to be able to type the address in manually from anywhere. But apparently I can&apos;t. So it looks like a bookmarklet is the next best thing.  &lt;br /&gt;&lt;br /&gt; The thing is, I&apos;ve spent alot of time learning php and perl to get to the point that I even know enough to need this, but bookmarklets are javascript, and javascript is a nut that is resisting my efforts to crack. I&apos;m working on learning this crazy new language cause I&apos;d like to be able to function in it, but maybe someone here can throw me a line on this one in the mean time? Because really I&apos;d rather be learning more perl right now and it seems like this would be mad simple if you know the stuff. For me its agony.</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.19840</guid>
  	<pubDate>Sun, 12 Jun 2005 22:13:07 -0800</pubDate>
  	<dc:creator>31d1</dc:creator>
	
	<category>javascript</category>
	
	<category>bookmarklet</category>
	
</item>
<item>
  	<title>By: Turd Ferguson</title>
  	<link>http://ask.metafilter.com/19840/Bookmarklet-that-goes-to-a-url-and-makes-the-referring-url-available-as-a-variable-for-a-script#325449</link>	
  	<description>How about something like&lt;br&gt;
&lt;pre&gt;javascript:var staticpage = &apos;http://www.mydomain.com/mypage.html&apos;; document.location.href = staticpage + &apos;?ref=&apos; + escape(document.location.href);&lt;/pre&gt; &lt;br&gt;
Of course, replace &apos;http://www.cnn.com/&apos; with whatever static page you want. The location of the page you are coming from will be available as $_GET[&apos;ref&apos;] in PHP, or similar in perl. &lt;br&gt;
&lt;br&gt;
(Not tested, off the top of my head, etc...)</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.19840-325449</guid>
  	<pubDate>Sun, 12 Jun 2005 22:36:32 -0800</pubDate>
  	<dc:creator>Turd Ferguson</dc:creator>
</item>
<item>
  	<title>By: Turd Ferguson</title>
  	<link>http://ask.metafilter.com/19840/Bookmarklet-that-goes-to-a-url-and-makes-the-referring-url-available-as-a-variable-for-a-script#325450</link>	
  	<description>And drunk... replace &apos;http://www.mydomain.com/mypage.html&apos; with your static page. Not &apos;http://www.cnn.com/&apos;. I just like CNN.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.19840-325450</guid>
  	<pubDate>Sun, 12 Jun 2005 22:37:52 -0800</pubDate>
  	<dc:creator>Turd Ferguson</dc:creator>
</item>
<item>
  	<title>By: bricoleur</title>
  	<link>http://ask.metafilter.com/19840/Bookmarklet-that-goes-to-a-url-and-makes-the-referring-url-available-as-a-variable-for-a-script#325499</link>	
  	<description>This works (assuming I correctly understand your question): &lt;pre&gt;a href=&amp;quot;javascript:location.href=&apos;http://yourdomain.com/yourpage.php?TITLE=&apos;+document.title+&apos;&amp;amp;LOCATION=&apos;+escape(location.href)&amp;quot;&lt;/pre&gt;&lt;br&gt;
And thank you for introducing me to the world of bookmarklets! I cadged this off &lt;a href=&quot;http://www.bookmarklets.com/tools/data/index.phtml#sendloc&quot;&gt;this page&lt;/a&gt;.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.19840-325499</guid>
  	<pubDate>Mon, 13 Jun 2005 04:35:35 -0800</pubDate>
  	<dc:creator>bricoleur</dc:creator>
</item>
<item>
  	<title>By: 31d1</title>
  	<link>http://ask.metafilter.com/19840/Bookmarklet-that-goes-to-a-url-and-makes-the-referring-url-available-as-a-variable-for-a-script#325598</link>	
  	<description>Thanks! I ended up using &lt;code&gt;a href=&amp;quot;javascript:location.href=&apos;http://mysite.com?&apos;+escape(location.href)&amp;quot;&lt;/code&gt;. Simple, and it works perfectly!</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.19840-325598</guid>
  	<pubDate>Mon, 13 Jun 2005 08:20:04 -0800</pubDate>
  	<dc:creator>31d1</dc:creator>
</item>
<item>
  	<title>By: 31d1</title>
  	<link>http://ask.metafilter.com/19840/Bookmarklet-that-goes-to-a-url-and-makes-the-referring-url-available-as-a-variable-for-a-script#325601</link>	
  	<description>And thanks Turd Ferguson, for while I didn&apos;t use your script per se, the way you wrote it out totally gave me an &amp;quot;aha&amp;quot; moment with all that variable assigning. You have taught a man to fish.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.19840-325601</guid>
  	<pubDate>Mon, 13 Jun 2005 08:24:57 -0800</pubDate>
  	<dc:creator>31d1</dc:creator>
</item>

    </channel>
</rss>
