Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-25-2002, 11:03 AM   PM User | #1
kamarthi7
New Coder

 
Join Date: Oct 2002
Location: germany
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
kamarthi7 is an unknown quantity at this point
hot to replace this

how to replace <P some text here> with the <P> tag.

actually I want to replace
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">
with a <P> tag.

and how to replace </B> to [/b] globally

var b = /</B>/g;
I could make this pattern is there any way to do this.



thank u
kamarthi7 is offline   Reply With Quote
Old 10-25-2002, 01:33 PM   PM User | #2
chrismiceli
Regular Coder

 
Join Date: Sep 2002
Location: Louisiana
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
chrismiceli is an unknown quantity at this point
i am kind of new to css but this should work, just put it under your body
Code:
<style>
P: {MARGIN: 0cm 0cm 0pt}
</style>
that should apply that stle to all <p> but i am not sure about the class thing. (or mine for that matter)
chrismiceli is offline   Reply With Quote
Old 10-25-2002, 03:07 PM   PM User | #3
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
Well, to do a replacing on a string of HTML would rougly go like this


var htmlStr = "<b>Hello</b> World!";
psuedoStr = htmlStr.replace(/<(/)?b>/g, "[$1b]");

psudeoStr *should* contain "Hello World!";

This what you are after?
__________________
My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
“Minds are like parachutes. They don't work unless they are open”
“Maturity is simply knowing when to not be immature”
beetle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 10:27 AM.


Advertisement
Log in to turn off these ads.