splur Posted March 23, 2010 Share Posted March 23, 2010 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? Link to comment Share on other sites More sharing options...
0 Cupcakes Posted March 23, 2010 Share Posted March 23, 2010 Very intuitive actually. :) <script language="javascript" type="text/javascript"> function callPage(oList) { var sValue = oList.options[oList.selectedIndex].value; window.location.href = sValue; } </script> 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. Link to comment Share on other sites More sharing options...
Question
splur
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?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts