View Detail button

View Detail button

In the CRM Leads view there is a 'View Detail' button. I tried pasting the formula for this button into my own app but it just shows up as code. The formula is

(("<a   style='white-space:nowrap;background:#3A5999;border:1px solid #4165C5;color:#ffffff'  href=\"#View:Detailed_Lead_View?lead_idstr=") + ID) + "\">View Details</a>"

What am I doing wrong

Eamon