html - Javascript changing iframe src doesn't work -


on website wrote function this:

function apri(dat) { document.getelementid('dado').src= dat; } 

and iframe html code following.

<iframe id="dado"src="http://mk7vrlist.altervista.org/" width="100%" height="700px" scrolling="yes" frameborder="0">   browser doesn't load iframe. </iframe> 

i call apri() function in way:

<p onclick="apri(http://mk7vrlist.altervista.org/other/staffpage.html)"> <img src="/pictures/uno.png" /> staffers</p> 

the content of iframe not changing. i've googled lot didn't find solution. can do?

do think should use different instead of iframe?

check error console after click text. see error message.

syntaxerror: missing ) after argument list 

the bug quoting problem. have string no quotes around it.

<p onclick="apri('http://mk7vrlist.altervista.org/other/staffpage.html')">                  ^                                                    ^               missing                                               missing 

Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -