Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document type does not allow element "iframe" here

Status
Not open for further replies.

lagc

Programmer
Jan 21, 2009
79
GB
I have this validation error:

document type does not allow element "iframe" here

with the code below:

Code:
//You may change most attributes of iframe tag below, such as width and height:
document.write('<iframe id="datamain" src="'+iframesrc+'" width="125px" height="220px" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>')

Can anybody help

Cheers
 
Hi

Missing [tt]CDATA[/tt] around code :
Code:
<script type="text/javascript">
[red]<![CDATA[[/red]

/***********************************************
* IFRAME Scroller script- © Dynamic Drive DHTML code library ([URL unfurl="true"]www.dynamicdrive.com)[/URL]
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at [URL unfurl="true"]http://www.dynamicdrive.com/[/URL] for full source code
***********************************************/

//specify path to your external page:
var iframesrc="external.htm"

//You may change most attributes of iframe tag below, such as width and height:
document.write('<iframe id="datamain" src="'+iframesrc+'" width="125px" height="220px" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>')

[red]]]>[/red]
</script>

Feherke.
 
Hi Feherke,

Blimey is that all it is.

Cheers for that. I wont forget that one in a hurry.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top