Showing posts with label paragraph. Show all posts
Showing posts with label paragraph. Show all posts

Monday, March 26, 2012

text formatting?

I have an SQL database where I'm pulling up some long paragraph cells. I was wondering how I might be able to format the text within these cells... if this is possible. For instance, if there is a website, I would like to make it an active link…. or I might want to bold something and put in a button to do so.
I know this is probably very complicated but I was wondering if anyone knows where or what I should start reading to be able to do something like this? Any points or ideas would be greatly appreciated! Thanks in advance!
RayMaybe the easiest way would be to put tags into the text, and store the text as HTML within the server. Then, when you pull it out, just make sure you display it as HTML and not just text. This would mean that you would have to manually style the text and type all the tags before storing it into the server.

HTH

Jags
yeah thats what I've been doing right now, it works but I thought there might be a better way. Thanks.

Saturday, March 24, 2012

text manipulation

Hi,

Senario: I'm retrieving some text from a database and when I display
this text on my page I want the first paragraph to be a different
color.

Do I need to break up the values i.e. find where <br><br> occurs and
substring up to this point. Then have two labels on the form??

or is there an easier method?

Thanks!

Jack"jack-e" <jack-b@.humlog.com> wrote in news:1123565399.992699.270660
@.g47g2000cwa.googlegroups.com:

> Hi,
> Senario: I'm retrieving some text from a database and when I display
> this text on my page I want the first paragraph to be a different
> color.
> Do I need to break up the values i.e. find where <br><br> occurs and
> substring up to this point. Then have two labels on the form??

Depending on how complex the search is, Regular expressions maybe a better
choice than substrings.

As for color coding, you can try:

-Style sheets, assign each paragraph to their own CSS class
-Rather than use two labels, you can just append some HTML to the database
text and place the results into a literal.

But in short, using two labels works just as well : )

--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
do you know how would i use a regular expression to find when a
paragraph finishes? (or begins?)
"jack-e" <jack-b@.humlog.com> wrote in message
news:1123568497.239674.83420@.z14g2000cwz.googlegro ups.com...
> do you know how would i use a regular expression to find when a
> paragraph finishes? (or begins?)

Depends entirely on how the paragraphs are encoded. Earlier you implied
two consecutive <br> tags, for example. Whenever I write paragraphs in HTML,
I enclose them in <p> and </p>, so looking for two <br> tags would not work
with my data.

- Oliver.

text manipulation

Hi,
Senario: I'm retrieving some text from a database and when I display
this text on my page I want the first paragraph to be a different
color.
Do I need to break up the values i.e. find where <br><br> occurs and
substring up to this point. Then have two labels on the form'
or is there an easier method?
Thanks!
Jack"jack-e" <jack-b@.humlog.com> wrote in news:1123565399.992699.270660
@.g47g2000cwa.googlegroups.com:

> Hi,
> Senario: I'm retrieving some text from a database and when I display
> this text on my page I want the first paragraph to be a different
> color.
> Do I need to break up the values i.e. find where <br><br> occurs and
> substring up to this point. Then have two labels on the form'
Depending on how complex the search is, Regular expressions maybe a better
choice than substrings.
As for color coding, you can try:
-Style sheets, assign each paragraph to their own CSS class
-Rather than use two labels, you can just append some HTML to the database
text and place the results into a literal.
But in short, using two labels works just as well : )
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]
do you know how would i use a regular expression to find when a
paragraph finishes? (or begins?)
"jack-e" <jack-b@.humlog.com> wrote in message
news:1123568497.239674.83420@.z14g2000cwz.googlegroups.com...
> do you know how would i use a regular expression to find when a
> paragraph finishes? (or begins?)
Depends entirely on how the paragraphs are encoded. Earlier you implied
two consecutive <br> tags, for example. Whenever I write paragraphs in HTML,
I enclose them in <p> and </p>, so looking for two <br> tags would not work
with my data.
- Oliver.