Sunday, November 14, 2010

Html????????

on piczo i want to put a html code in a box for people to copy and paste but when i copy the code into the text box it just activates how do i stop this from happening so people can just see the code so it appears as textHtml????????
You need a textarea. It doesn't render HTML so any code looks like text and does not activate.

Also the advantage of a textarea is that you can make it highlight all code when user clicks on it so they can copy to clipboard:



%26lt;textarea rows=20 cols=20 onclick=';copy(this)';%26gt;

HTML CODE GOES HERE AND LOOKS LIKE TEXT

%26lt;/textarea%26gt;



%26lt;script language=javascript%26gt;

function copy(area) {

area.focus();

area.select();

}

%26lt;/script%26gt;



Try this - it's the same as youtube, myspace etcHtml????????
You're the wiz kid; figure it out.
i agree with embed on text area. but however, there is no need for using javascript, unless you would want to limit the characters.

no hard feelings eMbEd, but you cannot use that code on myspace because myspace will not support java.



one of the codes i like to use when showing html

is this.



%26lt;table border=';0'; width=';100%'; cellpadding=';9'; cellspacing=';0';%26gt;YOUR TITLE GOES HERE GOES HERE

%26lt;tr%26gt;

%26lt;td%26gt;%26lt;textarea name=';Html'; rows=';5'; cols=';10'; class=';field'; style=';none';%26gt; YOUR CODE GOES HERE!

%26lt;/textarea%26gt;%26lt;/td%26gt;

%26lt;/tr%26gt;

%26lt;/table%26gt;



best wishes.

No comments:

Post a Comment