<iframe> not closing . .?

<iframe width="880" height="1200" style="border: outset; background-color:#999;"src="http://www.searchpoint.net/Search/mapSearch.aspx?_account=idd&_new=1&org_id=carets&agent_public_id=SSCHRRIC_socal&sponsor_office_id=H631_SOCAL&master_uid=DDA3E921-85C2-488C-8B79-DA50DB9D19BA&criteria=<Search><OrgId>carets</OrgId><NELat>33.644634857652186</NELat><NELong>-117.52349853515625</NELong><SWLat>33.61590588820444</SWLat><SWLong>-117.60606765747072</SWLong><LocationType></LocationType><MidLat>33.6302703729283</MidLat><MidLong>-117.564783096313</MidLong><Zoom>14</Zoom><SearchType>1</SearchType><PolygonType>custom</PolygonType><Location>Zip%20or%20City%20or%20Address</Location><MinPrice>$400,000</MinPrice><MinBeds>2</MinBeds><MinBaths>2</MinBaths><MinSqFt>1600</MinSqFt><Status>A,B</Status><oper_in_misearch_features_2>OR</oper_in_misearch_features_2><oper_in_misearch_features_3>OR</oper_in_misearch_features_3><RESPropertyType>SFR</RESPropertyType><PolyPoints><code></code>33.6429,%20-117.5775,33.6419,%20-117.5732,33.6429,%20-117.5681,33.6421,%20-117.5569,33.6327,%20-117.5586,33.6217,%20-117.5621,33.6168,%20-117.566,33.6169,%20-117.5714,33.6272,%20-117.5723,33.6344,%20-117.5735,33.6389,%20-117.5752,33.6429,%20-117.5775</PolyPoints><Features></Features></Search>
</iframe>

Any ideas . . .

Thanks . . . Rick

  1. The URL is not encoded which is causing the element to end early
  2. There is no ending double quote for src
  3. You haven’t closed the opening IFRAME element which is causing </iframe> to remove itself from the DOM

Anytime you have symbols or anything other then numbers and letters the URL should always be encoded to prevent undesired errors in your markup, see the below which should work fine now.

<iframe width="880" height="1200" style="border: outset; background-color:#999;"src="http%3A%2F%2Fwww.searchpoint.net%2FSearch%2FmapSearch.aspx%3F_account%3Didd%26_new%3D1%26org_id%3Dcarets%26agent_public_id%3DSSCHRRIC_socal%26sponsor_office_id%3DH631_SOCAL%26master_uid%3DDDA3E921-85C2-488C-8B79-DA50DB9D19BA%26criteria%3D%3CSearch%3E%3COrgId%3Ecarets%3C%2FOrgId%3E%3CNELat%3E33.644634857652186%3C%2FNELat%3E%3CNELong%3E-117.52349853515625%3C%2FNELong%3E%3CSWLat%3E33.61590588820444%3C%2FSWLat%3E%3CSWLong%3E-117.60606765747072%3C%2FSWLong%3E%3CLocationType%3E%3C%2FLocationType%3E%3CMidLat%3E33.6302703729283%3C%2FMidLat%3E%3CMidLong%3E-117.564783096313%3C%2FMidLong%3E%3CZoom%3E14%3C%2FZoom%3E%3CSearchType%3E1%3C%2FSearchType%3E%3CPolygonType%3Ecustom%3C%2FPolygonType%3E%3CLocation%3EZip%2520or%2520City%2520or%2520Address%3C%2FLocation%3E%3CMinPrice%3E%24400%2C000%3C%2FMinPrice%3E%3CMinBeds%3E2%3C%2FMinBeds%3E%3CMinBaths%3E2%3C%2FMinBaths%3E%3CMinSqFt%3E1600%3C%2FMinSqFt%3E%3CStatus%3EA%2CB%3C%2FStatus%3E%3Coper_in_misearch_features_2%3EOR%3C%2Foper_in_misearch_features_2%3E%3Coper_in_misearch_features_3%3EOR%3C%2Foper_in_misearch_features_3%3E%3CRESPropertyType%3ESFR%3C%2FRESPropertyType%3E%3CPolyPoints%3E%3Ccode%3E%3C%2Fcode%3E33.6429%2C%2520-117.5775%2C33.6419%2C%2520-117.5732%2C33.6429%2C%2520-117.5681%2C33.6421%2C%2520-117.5569%2C33.6327%2C%2520-117.5586%2C33.6217%2C%2520-117.5621%2C33.6168%2C%2520-117.566%2C33.6169%2C%2520-117.5714%2C33.6272%2C%2520-117.5723%2C33.6344%2C%2520-117.5735%2C33.6389%2C%2520-117.5752%2C33.6429%2C%2520-117.5775%3C%2FPolyPoints%3E%3CFeatures%3E%3C%2FFeatures%3E%3C%2FSearch%3E"></iframe>

NOTE: I just ran the URL through a quick online encoder so everything got encoded which is fine

Which on-line encoder did you use?

I tried some this afternoon but they didn’t work well.

You said “You haven’t closed the opening IFRAME element which is causing </iframe> to remove itself from the DOM”

I don’t understand this.

Rick . . .

I just used the first one that i saw in the Google search results https://www.google.com/search?q=online+url+encoder&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

You said “You haven’t closed the opening IFRAME element which is causing </iframe> to remove itself from the DOM”

I don’t understand this.

Basically what i mean is you had no ending > symbol which would have caused the closing </iframe> tag to remove itself from the DOM (Document Object Model) because it wouldn’t have been able to find the opening tag associated with it.

Here is my page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
[COLOR="#0000CD"]<html>
<head>[/COLOR]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="en"/>
<meta name="keywords" content="orange county real estate, rick schreiber, local broker, local real estate broker, local agent, local real estate agent, orange county real estate broker, orange county real estate agent, orange county listings, orange county mls listings, orange county homes for sale, oceanfront homes for sale, bayfront homes for sale, equestrian properties for sale, professional real estate agent, professional real estate broker, properties with style." />
<title>Map Search</title>
<link type="text/css" rel="stylesheet" href="css/mapsearch.css" media="screen,projection,tv"/>
[COLOR="#0000CD"]</head>
<div id="outer">
<body>[/COLOR]

[COLOR="#0000CD"]<div class="pleft">[/COLOR]<p>This search engine is linked directly to the CRMLS (California Regional Multiple Listing Service) system which is the largest MLS in the United States. You will receive the latest listing information <em>before it is &amp;quot;pushed&amp;quot; out</em> to all of the vendors nationwide.</p><p>EASY SEARCH: If you know the <em>zip code</em> enter that then click anywhere on the map. This will delineate the border of your search. Or enter the city name. Next select a <em>price range, bedrooms, and property type.</em> This will display house icons on the screen. At the bottom of the map you will see &amp;quot;Expand Map.&amp;quot; There is Map View, List View and Gallery view. You can <em>save a search</em> or set up eMail alerts to be notified of new listings.</p>[COLOR="#0000CD"]</div>[/COLOR]<!--eND pleft -->

[COLOR="#0000CD"]<div id="nav">[/COLOR]
  <ul id="navli">
    <li><a href="http://www.propertieswithstyle.com" title="HOME PAGE">PROPERTIES WITH STYLE HOME PAGE</a></li>
    <li><a href="http:// ">RETRUN TO CUSTOM SEARCH PAGE</a></li>
  </ul>
[COLOR="#0000CD"]</div>[/COLOR]<!--eND of Nav-->

[COLOR="#0000CD"]<div id="maincontent">[/COLOR]

Note: all of this in red is highlighted in Dreamweaver cs4. It’s in yellow in Dreamweaver but you can’t see yellow well on screen.
[COLOR="#FF0000"]<iframe width="880" height="1200" style="border: outset; background-color:#999" "src="http%3A%2F%2Fwww.searchpoint.net%2FSearch%2FmapSearch.aspx%3F_account%3Didd%26_new%3D1%26org_id%3Dcarets%26agent_public_id%3DSSCHRRIC_socal%26sponsor_office_id%3DH631_SOCAL%26master_uid%3DDDA3E921-85C2-488C-8B79-DA50DB9D19BA%26criteria%3D%3CSearch%3E%3COrgId%3Ecarets%3C%2FOrgId%3E%3CNELat%3E33.59124279066491%3C%2FNELat%3E%3CNELong%3E-117.77978897094728%3C%2FNELong%3E%3CSWLat%3E33.562496023333544%3C%2FSWLat%3E%3CSWLong%3E-117.86235809326173%3C%2FSWLong%3E%3CLocationType%3Esubdivision%3C%2FLocationType%3E%3CMidLat%3E33.5768694069992%3C%2FMidLat%3E%3CMidLong%3E-117.821073532105%3C%2FMidLong%3E%3CZoom%3E14%3C%2FZoom%3E%3CSearchType%3E1%3C%2FSearchType%3E%3CPolygonType%3Ecustom%3C%2FPolygonType%3E%3CLocationType%3Esubdivision%3C%2FLocationType%3E%3CCity%3E%2520Newport%2520Coast%3C%2FCity%3E%3CLocation%3ECrystal%2520Cove%2520Sea%2520Crest%3C%2FLocation%3E%3CMinPrice%3E%24600%2C000%3C%2FMinPrice%3E%3CStatus%3EA%2CB%3C%2FStatus%3E%3Coper_in_misearch_features_2%3EOR%3C%2Foper_in_misearch_features_2%3E%3Coper_in_misearch_features_3%3EOR%3C%2Foper_in_misearch_features_3%3E%3CRESPropertyType%3ESFR%3C%2FRESPropertyType%3E%3CPolyPoints%3E33.5641%2C%2520-117.8295%2C33.5696%2C%2520-117.8199%2C33.5868%2C%2520-117.8183%2C33.5888%2C%2520-117.8262%2C33.5748%2C%2520-117.8431%2C33.5641%2C%2520-117.8295%3C%2FPolyPoints%3E%3CFeatures%3E%3C%2FFeatures%3E%3C%2FSearch%3E></iframe>

<div class="imgpic">[/COLOR]<img src="css/images/sfrlogo.png" width="80" height="70" alt="Short Sale Logo" />[COLOR="#0000CD"]</div>[/COLOR]

[COLOR="#0000CD"]<div class="psmaller">[/COLOR]
Only those who have passed the National Association of Realtors&reg; education requirements for their Short Sale and Foreclosure Resource course are allowed to display this logo. Properties With Style, Inc. is a member in good standing of the National Association of Realtors&reg; and is proud to have earned this achievment.
[COLOR="#0000CD"]</div>[/COLOR]

[COLOR="#0000CD"]<div id="footer">[/COLOR]
<hr />Copyright, Properties With Style Inc., a Real Estate Corporation&copy;. The information being provided by CARETS&reg; is for the visitor's personal, non-commercial use and may not be used for any purpose other than to identify prospective properties visitor may be interested in purchasing. Any information relating to a property referenced on this web site comes from the Internet Data Exchange (IDX) program of the CARETS&reg; MLS. This web site may reference real estate listing(s) held by a brokerage firm other than the broker and/or agent who owns this web site. Any information relating to a property, regardless of source, including but not limited to square footages and lot sizes, is deemed reliable but not guaranteed and should be personally verified through personal inspection by and/or with the appropriate professionals. The data contained herein is copyrighted by CARETS&reg; and is protected by all applicable copyright laws. Any dissemination of this information is in violation of copyright laws and is strictly prohibited. CRMLS, Inc., data content displayed on this site is deemed reliable but is not guaranteed accurate by the MLS. Information of sellers and others have not been verified. Data maintained by the Associations or their MLS may not reflect all activity in the market. DRE License: 01408382<hr />
[COLOR="#0000CD"]</div>[/COLOR]<!--eND Footer-->

	[COLOR="#0000CD"]</div>[/COLOR]<!--enDmaincontent-->
   </div><!--outer-->   
[COLOR="#0000CD"] </body>
[COLOR="#0000CD"]</html>[/COLOR][/COLOR]
<!--ldsearch.html 11-8/2011-->

I’ve highlighted opening and closing div’s etc.

What am I missing . . . ?

Rick

Running your HTML through the W3C validator yields the reasons for the issues your having, here are the errors direct from the validator.

Line 3, Column 1: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml

Many Document Types based on XML need a mandatory xmlns attribute on the root element. For example, the root element for XHTML might look like:
<html xmlns=“http://www.w3.org/1999/xhtml”>

     [I]Line 11,         Column 16[/I]:     document type does not allow element "div" here; assuming missing "body" start-tag

Line 12, Column 6: document type does not allow element “body” here

        The element named above was found in a context where it is not allowed.       This could mean that you have incorrectly nested elements -- such as a       "style" element in the "body" section instead of inside "head" -- or       two elements that overlap (which is not allowed).     
        One common cause for this error is the use of XHTML syntax in HTML       documents. Due to HTML's rules of implicitly closed elements, this error       can create cascading effects. For instance, using XHTML's "self-closing"       tags for "meta" and "link" in the "head" section of a HTML document may       cause the parser to infer the end of the "head" section and the       beginning of the "body" section (where "link" and "meta" are not       allowed; hence the reported error).

Line 26, Column 15: there is no attribute “width”

        You have used the attribute named above in your document, but the       document type you are using does not support that attribute for this       element. This error is often caused by incorrect use of the "Strict"       document type with a document that uses frames (e.g. you must use       the "Transitional" document type to get the "target" attribute), or       by using vendor proprietary extensions such as "marginheight" (this       is usually fixed by using CSS to achieve the desired effect instead).     
        This error may also result if the element itself is not supported in       the document type you are using, as an undefined element will have no       supported attributes; in this case, see the element-undefined error       message for further information.     
        How to fix: check the spelling and case of the element and attribute,        (Remember XHTML is all lower-case) and/or        check that they are both allowed in the chosen document type, and/or       use CSS instead of this attribute. If you received this error when using the        &lt;embed&gt; element to incorporate flash media in a Web page, see the        [FAQ item on valid flash](http://validator.w3.org/docs/help.html#faq-flash).
     [I]Line 26,         Column 28[/I]:     there is no attribute "height"
        You have used the attribute named above in your document, but the       document type you are using does not support that attribute for this       element. This error is often caused by incorrect use of the "Strict"       document type with a document that uses frames (e.g. you must use       the "Transitional" document type to get the "target" attribute), or       by using vendor proprietary extensions such as "marginheight" (this       is usually fixed by using CSS to achieve the desired effect instead).     
        This error may also result if the element itself is not supported in       the document type you are using, as an undefined element will have no       supported attributes; in this case, see the element-undefined error       message for further information.     
        How to fix: check the spelling and case of the element and attribute,        (Remember XHTML is all lower-case) and/or        check that they are both allowed in the chosen document type, and/or       use CSS instead of this attribute. If you received this error when using the        &lt;embed&gt; element to incorporate flash media in a Web page, see the        [FAQ item on valid flash](http://validator.w3.org/docs/help.html#faq-flash).

Line 26, Column 41: there is no attribute “style”

        You have used the attribute named above in your document, but the       document type you are using does not support that attribute for this       element. This error is often caused by incorrect use of the "Strict"       document type with a document that uses frames (e.g. you must use       the "Transitional" document type to get the "target" attribute), or       by using vendor proprietary extensions such as "marginheight" (this       is usually fixed by using CSS to achieve the desired effect instead).     
        This error may also result if the element itself is not supported in       the document type you are using, as an undefined element will have no       supported attributes; in this case, see the element-undefined error       message for further information.     
        How to fix: check the spelling and case of the element and attribute,        (Remember XHTML is all lower-case) and/or        check that they are both allowed in the chosen document type, and/or       use CSS instead of this attribute. If you received this error when using the        &lt;embed&gt; element to incorporate flash media in a Web page, see the        [FAQ item on valid flash](http://validator.w3.org/docs/help.html#faq-flash).

Line 26, Column 81: an attribute specification must start with a name or name token

An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).

Line 26, Column 81: element “iframe” undefined

        You have used the element named above in your document, but the       document type you are using does not define an element of that name.       This error is often caused by:     
  • incorrect use of the “Strict” document type with a document that uses frames (e.g. you must use the “Frameset” document type to get the “<frameset>” element),
  • by using vendor proprietary extensions such as “<spacer>” or “<marquee>” (this is usually fixed by using CSS to achieve the desired effect instead).
  • by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

Line 39, Column 9: end tag for “body” omitted, but OMITTAG NO was specified

You may have neglected to close an element, or perhaps you meant to “self-close” an element, that is, ending it with “/>” instead of “>”.

Basically what this all means is as follows:

  • Your opening DIV element is currently wrapping the BODY element which is invalid
  • You have declared no XMLNS referral URL in your HTML tag which is for validation purposes
  • You have a double quote sitting before the src attribute which is causing the end tag for your </iframe> to remove itself from the DOM
  • Because your using a strict <!DOCTYPE> using attributes such as width, height and style are invalid on an <iframe>, it would be more beneficial to use a transitional <!DOCTYPE> instead
  • Again because of the <!DOCTYPE> your using the <iframe> element is invalid because it has been removed as an element in the strict markup documentation
  • The last error is been caused because of the first point i made