Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I process another file as HTML from JavaScript?

Status
Not open for further replies.

SparceMatrix

Technical User
Mar 9, 2006
62
0
0
US
I've come up against this problem several times now. I tried dealing with it with PHP, but it appears my commercial host has disabled classes so that I can't use the DOM class ("disabled_classes -- no value" in my phpinfo()). I need to load an HTML file to search the text and highlight found terms and return the whole file as an HTML page.

Is it possible? I can imagine it isn't since it could be a security problem, but it is hard to tell from my pocket reference.
 
That's great! But save me a few more minutes and tell me if I could search any other page with the same code. I'm not exactly clear what the "document referrer" is and what is supposed to happen with the highlightGoodleSearchTerms function. I tried it with the default value and nothing happened.
 
If this is a tool for your own personal use or for an intranet site you could grab the page with AJAX, highlight the search terms, and write the content to a new window. But if this is a public website DON'T DO IT or you'll be violating copyright laws by showing someone else's content with your domain name.

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top