dom - Creating a document from url javascript -


this i've tried:

function createdocumentz() {     var doc = document.implementation.createhtmldocument('http://www.moviemeter.nl/film/270',null,'html');     return doc; } 

even though document gets created, if run firebug says body node has no childnodes, idea why?

looks assume can use createhtmldocument() download , parse html file url you've passed first parameter. not case, createhtmldocument() creates empty document.

also, parameters you've passed function of createdocument(). createhtmldocument() takes 1 parameter, document title. if you'd use createdocument(), first parameter uri of namespace, not source document.

unfortunately there's no way download , manipulate external web site's html using javascript alone. closest can displaying document in iframe.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -