Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 18-06-2011, 05:19 PM   #1 (permalink)
Wise Old Owl
 
speedyguy's Avatar
 
Join Date: Aug 2004
Location: Bangalore/Jamshedpur
Posts: 1,173
Default xhtml help


i need to write an xhtml code with a paragraph where i need to assign colors based on their words. for example, all prepositions with color red. how do i do that?

now what i know is, i can use css to assign colors, or use javascript to pass events. but how do i put up an if for a particular text (word)

Enjoy~!
__________________
No Pain...No Gain
speedyguy is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 18-06-2011, 05:45 PM   #2 (permalink)
BIOS Terminator
 
nims11's Avatar
 
Join Date: Apr 2008
Location: Ranchi
Posts: 816
Default Re: xhtml help

you need to use javascript to achieve that.
nims11 is online now   Reply With Quote
Old 18-06-2011, 08:09 PM   #3 (permalink)
Wise Old Owl
 
abhidev's Avatar
 
Join Date: Sep 2009
Posts: 1,624
Default Re: xhtml help

js all the way.......
__________________
Core 2 duo E4500 2.2gHz , ASUS P5GCMX , 3GB Transcend , Corsair VX 550w, MSI R5770 HAWK Edition 1GB, CM HAF-922, LG W2243T 21.5" LCD, I-Ball Baton
abhidev is online now   Reply With Quote
Old 19-06-2011, 02:15 PM   #4 (permalink)
Wise Old Owl
 
speedyguy's Avatar
 
Join Date: Aug 2004
Location: Bangalore/Jamshedpur
Posts: 1,173
Default Re: xhtml help

Ya but can u guide me with that. Im not able to figure out how to validate text words...

Enjoy~!
__________________
No Pain...No Gain
speedyguy is offline   Reply With Quote
Old 20-06-2011, 12:30 PM   #5 (permalink)
Wise Old Owl
 
abhidev's Avatar
 
Join Date: Sep 2009
Posts: 1,624
Default Re: xhtml help

can you mention the different criteria based on which you want to highlight the words??
__________________
Core 2 duo E4500 2.2gHz , ASUS P5GCMX , 3GB Transcend , Corsair VX 550w, MSI R5770 HAWK Edition 1GB, CM HAF-922, LG W2243T 21.5" LCD, I-Ball Baton
abhidev is online now   Reply With Quote
Old 21-06-2011, 01:26 PM   #6 (permalink)
Wise Old Owl
 
speedyguy's Avatar
 
Join Date: Aug 2004
Location: Bangalore/Jamshedpur
Posts: 1,173
Default Re: xhtml help

take for simple example... an html paragraph <p> with all prepositions (like a,the,this,that,it etc) be colored red.

Enjoy~!
__________________
No Pain...No Gain
speedyguy is offline   Reply With Quote
Old 21-06-2011, 01:34 PM   #7 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default Re: xhtml help

I think you need this - JavaScript Text Highlighting
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline   Reply With Quote
Old 23-06-2011, 09:44 AM   #8 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: xhtml help

^^ that was a good find. i included the source in my bank
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
arpanmukherjee1 is offline   Reply With Quote
Old 23-06-2011, 11:50 AM   #9 (permalink)
Wise Old Owl
 
speedyguy's Avatar
 
Join Date: Aug 2004
Location: Bangalore/Jamshedpur
Posts: 1,173
Default Re: xhtml help

seriously very good find.... thanks a lot...

Enjoy~!
__________________
No Pain...No Gain
speedyguy is offline   Reply With Quote
Old 23-06-2011, 01:22 PM   #10 (permalink)
Wise Old Owl
 
abhidev's Avatar
 
Join Date: Sep 2009
Posts: 1,624
Default Re: xhtml help

cool....got u got ur answer....

nice find @garbage
__________________
Core 2 duo E4500 2.2gHz , ASUS P5GCMX , 3GB Transcend , Corsair VX 550w, MSI R5770 HAWK Edition 1GB, CM HAF-922, LG W2243T 21.5" LCD, I-Ball Baton
abhidev is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:30 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2