javascript - Change input value loaded inside HTML Object Tag, is it possible? -
i have simple html webpage loads webpage using html object tag, , know if possible change content of input loaded inside object tag.
my code:
<html lang="en"> <head> <script> function fill(){ document.getelementbyid('uri').value = "hola"; } </script> </head> <body> <button type="button" id="fill" onclick="fill()">fill</button> <object style="width:800px;height:600px;" data="http://validator.w3.org/" /> </body> inside loaded object, there's input id 'uri', change value. error give "cannot set property 'value' of null", means javascript isn't seeing input.
so, there anyway can accomplished?
<object> not have "value" attribute. can assume want change value of whatever loaded object, looks of it, hosted on validator.w3.org.
unless website validator.w3.org, won't able that. javascript can access dom of pages on same domain. won't able change inputs on pages/objects loaded other domains via frame/object/whatever.
Comments
Post a Comment