|
-
Jun 5th, 2001, 01:50 PM
#1
Thread Starter
New Member
Parse HTML before it is processed
Is it possible to either prevent certain HTML tags being processed (i.e. those responsible for pop-ups ) or prevent new windows being launched.
I was thinking about perhaps downloading the file to disk, processing it as text to remove unwanted tags, save the new file and then load this in the browser. I would like to avoid having to do this as linking will become a problem - as will frames.
G
-
Jun 5th, 2001, 06:41 PM
#2
Good Ol' Platypus
Replacing:
Newc = Replace(OldC, "window.open", "//window.open")
(I believe) will stop new windows from opening (which would stop popups.) this is for parsing the HTML yourself from VB.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jun 6th, 2001, 03:27 PM
#3
Addicted Member
Short of doing what you suggested, d/ling the file and displaying yourself, there's no way to prevent IE from rendering/executing tags it finds in pages, except within the browser's Options menu.
Sastraxi's idea is valid, but replacing the tags with a "//[tag]" wouldn't be a good idea, since the browser would just see that as a malformed tag and either display the tag (not render it w/o the part you want out) or throw up an error. Anyway, just replace the tags with a blank string: Replace(htmlFile,"window.open","")
Things I've Said:
"Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
"Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
"You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|