My Computer Back in Service

"Make Your Computer Smile Again!"

happyscreen.JPG

Why Copy & Paste Doesn’t Work on Some Code

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.

Leave a Reply

  • From the Archives

  • Subjects

  • Look-up Posts by Date

    February 2012
    S M T W T F S
    « Jan    
     1234
    567891011
    12131415161718
    19202122232425
    26272829