<p>Like the Delicious submission bookmark-let, I'd like to have some standard JavaScript I can use to submit any visited URL to a 3rd party site when that's possible by URL.  Suggestions?</p>

<p>For example, I've been using </p>

<pre><code>javascript:void(location.href="http://www.yacktrack.com/home?query="+encodeURI(location.href)) 
</code></pre>

<p>so far but wonder if there's something more sophisticated I could use or better practice.</p>

[{'answer_id': 54446, 'author': 'John Boker', 'author_id': 2847, 'author_profile': 'https://Stackoverflow.com/users/2847', 'pm_score': 1, 'selected': False, 'text': '<pre><code>document.location = "http://url_submitting_to.com?query_string_param=" + window.location;\n</code></pre>\n'}, {'answer_id': 54470, 'author': 'Justin Voss', 'author_id': 5616, 'author_profile': 'https://Stackoverflow.com/users/5616', 'pm_score': 3, 'selected': True, 'text': "<p>Do you want something exactly like the Delicious bookmarklet (as in, something the user actively clicks on to submit the URL)? If so, you could probably just copy their code and replace the target URL:</p>\n\n<pre><code>javascript:(function(){\n    location.href='http://example.com/your-script.php?url='+\n    encodeURIComponent(window.location.href)+\n    '&amp;title='+encodeURIComponent(document.title)\n})()\n</code></pre>\n\n<p>You may need to change the query string names, etc., to match what your script expects.</p>\n\n<p>If you want to track a user through your website automatically, this probably won't be possible. You'd need to request the URL with AJAX, but the web browser won't allow Javascript to make a request outside of the originating domain. Maybe it's possible with <code>iframe</code> trickery.</p>\n\n<p><strong>Edit:</strong> John beat me to it.</p>\n"}, {'answer_id': 54531, 'author': 'Hafthor', 'author_id': 4489, 'author_profile': 'https://Stackoverflow.com/users/4489', 'pm_score': 0, 'selected': False, 'text': '<p>Another option would be to something like this:</p>\n\n<pre><code>&lt;form action="http://www.yacktrack.com/home" method="get" name="f"&gt;\n  &lt;input type="hidden" name="query" /&gt;\n&lt;/form&gt;\n</code></pre>\n\n<p>then your javascript would be:</p>\n\n<pre><code>f.query.value=location.href; f.submit();\n</code></pre>\n\n<p>or you could combine the [save link] with the submit like this:</p>\n\n<pre><code>&lt;form action="http://www.yacktrack.com/home" method="get" name="f" onsubmit="f.query.value=location.href;"&gt;\n  &lt;input type="hidden" name="query" /&gt;\n  &lt;input type="submit" name="Save Link" /&gt;\n&lt;/form&gt;\n</code></pre>\n\n<p>and if you\'re running server-side code, you can plug in the location so you can be JavaScript-free:</p>\n\n<pre><code>&lt;form action="http://www.yacktrack.com/home" method="get" name="f"&gt;\n  &lt;input type="hidden" name="query" value="&lt;%=Response.Url%&gt;" /&gt;\n  &lt;input type="submit" name="Save Link" /&gt;\n&lt;/form&gt;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/54426', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5613/']