I think the weather alert has changed somewhat and i cant seem to strip out the html tags at the beginning and end of the alert does anyone have any ideas how to fix this
this is what i have in my script
resp=StripHTML(resp) 'strip the html tags
l=len(resp)
s=instr(resp, "National Weather Service")
resp=right(resp, l-s-25000) 'chop off the header
l=len(resp)
s=instr(resp, "Close this window")
resp=left(resp, l-s-6000) 'chop off the trailer
' resp = Replace(resp, vbNewLine, "") 'get rid of newlines, etc







Reply #1 Tuesday, February 24, 2009 5:36 PM
It looks like you have a function (StripHTML) to remove the tags. What's that look like? Also, are you modifying an existing widget? If so, which one?
For what it's worth, here's the function I use to remove all html tags.
Function removeXstuff(stuff)
'Remove everything between angle brackets from the extracted info
xstuffL = Instr(1, stuff, "<")
While xstuffL <> 0
xstuffR = Instr(xstuffL, stuff, ">")+ 1
xstuffLen = xstuffR - xstuffL
xstuff = Mid(stuff, xstuffL, xstuffLen)
stuff = Replace(stuff, xstuff, "")
xStart= xstuffR - 1
xstuffL = Instr(xStart, stuff, "<")
Wend
removeXstuff = stuff
End Function
It works for the most part. Once or twice I've had to run the info through the function a second time to get some straggler tags out.