lat9:
Assuming that you want to link to http://zen-cart.com, you'd add the following:
<a href="//zen-cart.com" target="_blank">Zen Cart!</a>
> Omitting the http: from the link makes it so that you won't get "mixed content" (i.e. http:// content on an https:// page) and the target="_blank" opens the page in a new window.
Mind if I add my 2cents worth? Too bad <g>
If it is known that external link supports SSL, then it is better to explicitly define it in the href rather than using the protocol-agnostic link as you've described.
EG:
<a href="https://zen-cart.com" target="_blank">Zen Cart!</a>
<a href="//zen-cart.com" target="_blank">Zen Cart!</a>
However, if the link is included in a page that will never be used with SSL, then it is better to use
<a href="http://zen-cart.com" target="_blank">Zen Cart!</a>
The protocol agnostic links should be a 'last resort' rather than a 'front line' method.
For the coders amongst us, the protocol agnostic links are much like a 'loosely/weakly typed' language vs a 'Strongly typed' language.
It works most of the time, but it can also have unexpected and unwanted behaviour.
Where possible it pays to be explicit.
Cheers
RodG
NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.
Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.