In a tabbed browser (FF 3.5 in for me), I often open links in new tabs with CTRL-click or middle-click. When the link contains a Javascript function, either:
javascript:window.print()
or what-have-you in the address bar.Thing is, this doesn't seem to happen consistently for all Javascript functions. For example:
The links in question contain the following code, respectively:
javascript:window.print();
javascript:_hbRedirect('PDF Downloads','White Paper','URL.pdf','&c1=TITLE|US-en')
This SO question is somewhat similar. The best-rated answer details an AJAX-based solution, but I could not find an explanation for why some Javascript functions behave differently with tabs than others.
That happens because window.print()
is already defined by default so it is called normally.
The javascript:_hbRedirect('PDF Downloads','White Paper','URL.pdf','&c1=TITLE|US-en')
link calls an undefined function so nothing happens.