Hi there,
Recently everytime I simply edit my webpages using dreamweaver, those pages are unviewable using Safari and Chrome. When using Chrome's Developer Tool, the error:

"Uncaught ReferenceError: loadIFrame is not defined /home.html:362" comes up for the pages.

I didnt develop the IFrames in my website and dont know much about them so this error causes me confusion :confused:

Can someone break this down for me and possibly help??? Cheers!

http://www.newtowncentre.org
(Specifically under "campaigns and media")

Dani AI

Generated

Brief expert summary: the symptom reported by — pages edited in Dreamweaver that suddenly fail in WebKit browsers while a console error shows a missing JavaScript function — typically traces back to HTML parsing/encoding problems rather than the function itself. 's validator results and the incomplete DOCTYPE pointed to exactly this: bad parse state can stop the browser from seeing or executing the script that defines a function, which makes the function appear "undefined" in Chrome/Safari even when older, more tolerant browsers still render something.

Why this breaks scripts (short): a malformed top-of-file (wrong or truncated DOCTYPE, stray bytes or BOM before the DOCTYPE, unclosed tags or comments) alters the parser’s mode or corrupts markup so that subsequent <script> blocks or external JS files are not interpreted as expected. Missing or 404’d script files, scripts included in the wrong order, or functions wrapped in closures (not added to the global scope) can also produce the same console symptom.

Practical troubleshooting checklist:

  • Run an HTML validator and fix critical parse errors; "unable to determine parse model" is a strong hint the DOCTYPE/structure is wrong.
  • Open the page in a plain text editor (or hex viewer) to confirm nothing precedes the DOCTYPE (no BOM, no invisible bytes, no whitespace).
  • In the browser devtools: check Console for errors, Network for failed JS loads, and Sources to search for where the missing function should be defined.
  • Ensure script inclusion order is correct and that script tags are well-formed (not accidentally nested inside comments or malformed tags).
  • Check server paths and filename case sensitivity (Linux hosts are case-sensitive).
  • After each change, revalidate and retest in Chrome/Safari.

Notes: Dreamweaver can introduce encoding changes (BOMs) or alter declarations; when editing templates or includes, prefer verifying the raw saved file and save without BOM if possible. Fixing doctype/encoding and repairing parse errors commonly restores normal script execution, as observed in the thread.

Recommended Answers

All 2 Replies

There's nothing wrong when I view them in safari, chrome, firefox, IE5, IE6, IE7 and IE8, except for the Media page.

When i run just the media page through the validator it throws up 48 errors, including unable to determine parse model.

This might be becasue you only have half th edoctype declaration

it should be
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

but the page only has
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

So try editing the doctype to the full code. Also do this in some primitive text editor, as the validator mentions unicode as you have the outer page in charset=us-ascii" so try setting
ascii everywhere

You are a gem! thank you so much that totally fixed the problem! Much appreciation!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.