• 0

embedding text into copy & paste action


Question

So, while I was replying to another post on here, I was trying to copy a paste from an article on a website, and noticed that it copy a pasted extra text which wasn't on the page. It's actually from National Post, just as an example.

http://network.nationalpost.com/NP/blogs/toronto/archive/2010/03/23/cn-tower-is-staying-as-cn-tower.aspx

If you try to copy and past the article, it'll copy the article and at the bottom, also this text...

"<article>

Read more: http://network.nationalpost.com/NP/blogs/toronto/archive/2010/03/23/cn-tower-is-staying-as-cn-tower.aspx#ixzz0j22tyrzZ

The National Post is now on Facebook. Join our fan community today."

It's not there anywhere in the article, nor when I tried to search it in the HTML code is it in there either. How did they do it? Javascript?

1 answer to this question

Recommended Posts

  • 0

Very intuitive actually. :)

    &lt;script language="javascript" type="text/javascript"&gt;
        function callPage(oList) {
            var sValue = oList.options[oList.selectedIndex].value;
            window.location.href = sValue;
        }
    &lt;/script&gt;

That's in the header; They've got other JS files throughout the site that will have the rest of the code itself. Didn't feel like going through all of them :p.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.