• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

embedding text into copy & paste action

Question

splur    27

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?

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Cupcakes    151

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.