javascript - Resolving paths within HTML from another domain -


i need html domain, highlight words in , display in iframe, keeping , behaviour of original page.

so, pass page's url ajax script php file, retrieves html content curl, processes it, , returns ajax script. put processed content iframe. now, ok except paths website's resources relative domain's root (beginning '/'), naturally page inside iframe rendered without css, js, images etc. also, website's navigation links naturally dead.

what's best way handle this? considering obtained html can contain paths relative document well.

try this:

<base href="http://www.theotherwebsite.com"> 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -