Why Copy & Paste Doesn’t Work on Some Code
Posted by Joe Hauckes
If you're new here,
You may want to Subscribe to my RSS Feed or if you prefer ... Subscribe via e-mail. Thanks for visiting!
In the post about Putting Post Preview Back the other day, I had an “*” for the Copy & Paste process to use the code I had shown. The reason being…
When you copy & paste code sometimes it doesn’t work.
This happens because sometimes you aren’t getting the “real” code. You are getting the “viewing” code instead of the actual characters that the computer reads.
As an example:
When the code calls for…
?>
<div id=’preview’ class=’wrap’>
so the computer knows where the “divider” is and what class the “preview” is and how it works, this is what the computer needs to run the code correctly.
But when you code it for viewing, it looks like this…
?& gt;
& lt;div id=’preview’ class=’wrap’& gt;
to the computer.
Does that sound confusing? Well, that’s what happens to the computer when it tries to read the “view” that we see instead of the “real”code that it needs. It gets confused.
So, the next time you Copy & Paste some code and it doesn’t work right the first time, try Typing the exact code you see in the text. The odds are that the code is right, but you are getting the “view” code instead of the “real” thing.
Related Posts:



