I use skeleton framework to sketch tabs inside IFRAME widget. Each tab has code like this:
<a class="active" href="#skeletonTab0" target="_top">Name of tab</a>
href pointed to #…. is required for the menu to work.
When user right clicks on this tab and selects “copy URL” he gets the URL of the widget host http://dummyhost.com/index.php#skeletonTab0.
But because the widget is embedded on site http://importantnews.com i would like him to copy URL to:
http://importantnews.com/index.php?showTab=0
Is there any way to make it so that a will have href pointed to #skeletonTab0 but when user tries to copy the URL he will get proper URL on important news?
Basically the question is if i can provide user trying to copy URL from a href other href than actual href?
EDIT: Today, i’ve found a working example of something similar to what i try to obtain, but still figure out how to make this work for me.
Look at this site:
https://plus.google.com/100784670873737717716/posts/PAEa7sFcKMS
- When you click “What i learned” it redirects you to http://www.readwriteweb.com.
- When you copy the URL of this link you get http://www.readwriteweb.com.
- But when you click the link plus.url.google.com* redirecting to http://www.readwriteweb
Have you any ideas?
Not really, no. What you could do is have the link point to
http://importantnews.com/index.php?showTab=0but register an onclick listener so that when the link is clicked, the default action (i.e. going to that link) is cancelled and replaced by your desired action.