Gossamer Forum
Home : General : Internet Technologies :

Text Areas ?????

Quote Reply
Text Areas ?????
I want to use the common code of <textarea></textarea> but I need to know what definations can be defeined in this.

A quick search of the internet and the text are used in HTML seems to be too basic. For example you can wrap the text and that seems to be it. I would like to have bolded text or coloured highlighted text. I am aware you can change the whole box and text colour theme but in the case of highlight a word can this be done.

I know it can be done (well I think) by using javascript, but in my case I want to use it in my search.cgi script in links 2.0 for the return results in the description field. I have this as a text area.

Any feedback or codes is highly appreciated.

Stu

Last edited by:

stu2000: Nov 23, 2002, 8:17 AM
Quote Reply
Re: [stu2000] Text Areas ????? In reply to
anyone help ???
Quote Reply
Re: [stu2000] Text Areas ????? In reply to
I've moved the thread as I think it was more appropriate here.

I personally don't know of a way to do that, but that isn't saying much :)
Quote Reply
Re: [stu2000] Text Areas ????? In reply to
If all you want to do is display text in a TEXTAREA box, then you could simply use:

Code:
<form action="something" method="POST">
<textarea name="Description" rows="10" cols="5" wrap="physical/virtual"><%Description%></textarea>
</form>

If you wanted to be really slick, you could put the first form codes before <%links%> in your search_results.html file and the end form anchor codes at the end of <%links%> in the search_results.html.

Like the following:

Code:
<%if links%>
<form action="something" method="POST">
<%links%>
</form>
<%endif%>

Then in the link.html file, add the following codes:

<textarea name="<%ID%>" rows="5" cols="10" wrap="virtual/physical"><%Description%></textarea>

You can use CSS2 codes to highlight text within textarea, go to the www.w3.org website and look over the CSS section.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Text Areas ????? In reply to
Thanx for the reply Eliot. I currently have the <%description%> tag set up as you said above with the really slick part.

In my search.cgi I have
Code:
# This reg expression will do the trick, and doesn't bold things inside <> tags such as
# URL's.
$link_results =~ s,(<[^>]+>)|(\Q$term\E),defined($1) ? $1 : "<b>$2</b>",gie;
$category_results =~ s,(<[^>]+>)|(\Q$term\E),defined($1) ? $1 : "<b>$2</b>",gie;

But as suspect when I do a search and the results are in the description tag it returns as <b>query</b> instead of being bolded. I had an inclination that this would happen, but just wondered if this could be over come for a text area field, if not I will just have to set up a new link.html without a text area description.
Quote Reply
Re: [stu2000] Text Areas ????? In reply to
1) Perl is case sensitive. You need to use <%Description%>

2) In terms of the search results, you need to put the form codes around <%link_results%> in the search_results.html.

3) In terms of the TEXTAREA codes, you'll need to use them in the LINK.HTML template OR create another different template for the link output in the SEARCH.CGI script.

Good luck!
========================================
Buh Bye!

Cheers,
Me