VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 strip html
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

VP-ASP Super User

393 Posts

Posted - February 04 2008 :  16:07:36  Show Profile  Visit apswater's Homepage  Reply with Quote
I posted some code a few weeks back for removing html from a string. Now it is gone. Can someone tell me why?


4282 Posts

Posted - February 04 2008 :  16:22:10  Show Profile  Visit support's Homepage  Reply with Quote
Hi Mitch,

We suffered a meltdown on our database and have lost a number of records unfortunately.


VP-ASP Support

Here it is again for everyone:

After looking around to find a prewritten function that will remove html code from a string, I came up empty.

so I wrote one.

If any of you need it, here is it for free.
It works great if you put links in your category description like I do, then use those description to make your meta tags,.

I didnt dim the variables so make sure you dont use the optons explicit or it wont work.

function striphtml(strString)

htmlread = "on"

If len(strString) = 0 or isnull(strString) then
stripHtml = ""
exit function
End if


do until y = len(strstring)



if startstring ="<" then
endstring=" " & endstring
end if

if startstring ="<" then trigger="on"

if htmlread = "on" then

endstring=endstring & startstring
'response.write "<hr>" & endstring & "<hr>"

end if

if startstring = ">" then
htmlread = "on"
endstring = endstring & " "
end if

striphtml = trim(clean(endstring))


set startstring=nothing
set endstring=nothing
set triggerr=nothing
exit function
end function

Go to Top of Page

VP-ASP Super User

393 Posts

Posted - February 04 2008 :  16:26:32  Show Profile  Visit apswater's Homepage  Reply with Quote
Thanks Cam.

I just wanted to make sure I didnt do something wrong.

of course, now I see someone whote something similar in 2004!
Go to Top of Page

VP-ASP New User

85 Posts

Posted - December 02 2008 :  12:22:42  Show Profile  Reply with Quote
how do I use this. I am trying to strip out the HTML in [cdescription], so when it displays in top sellers, it is not bold and formatted.

Where do I put this code and how do I call it on "tmp_topsellers.htm"

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000