Laphan wrote:
I'm dynamically building up an iFrame (in other words it doesn't have
another web page as it's source) and I need some way of checking via JS if
the iframe contains any HTML/text before the JS allows the data to be
submitted.
Check if the iframe has a document e.g.
var iframe, iframeDoc;
if ((iframe = window.frames.iframeName) &&
(iframeDoc = iframe.document))
{
then you can use DOM methods like getElementsByTagName e.g.
if (iframeDoc.getElementsByTagName('*').length > 0)
to check whether there are any element nodes in the document.
--
Martin Honnen
http://JavaScript.FAQTs.com/