It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

finding and deleting a tag

finding and deleting a tag

Postby tazzi on Thu Jun 26, 2008 1:09 pm

Hi to any one that can point help me out

I want to be able delete a <p> and </p> tag that is around a bit of php script using javascript
so something like this: (and I know this doesn't make sense)

function (){
var theTags = Document.Tags.FindAll("p",Item);
if (theTags){
delete
}
}

in other words I want to find the the first opening p tag and the closing p tag and delete them but leaving the content that was wrapped by the tags untouched
Is this possible

so the end result would change from this:

<div><p><?php some php script ?></p></div>

to just this:

<div><?php some php script ?></div>


I hope this makes sense!!

thanks in advance tazzi
tazzi
 
Posts: 0
Joined: Thu Jun 26, 2008 12:40 pm

Who is online

Users browsing this forum: No registered users and 8 guests