javascript - Is there a way to dynamically edit content displayed in WebView? -


i have webview internet website loaded in , want edit content dynamically, instance change code

<button>search</button> 

to

<button>view</button> 

what did far allowed user load website take html, change content want , load webview. content changes fine images not displayed(i guess happens becuase not have local resources images etc.). there way to dynamically change content of online website while preserving images,structure etc.? in advance

if understand things correctly, you're loading page website, change things, , send modified page web view.

then issue "base url" of local modified page, not original website, relative urls (without domain name) use base, , of course fail.

one option add:

<base href="(original url of page goes here)"/> 

to <head> of page.

this solve issues loading images, css, scripts, etc.

however, have issue affected cross-origin protection (ajax instance).

alternatively, load page original url, , use local javascript modify contents of page.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -