Page 1 of 1

startExpandCollapse NOT XHTML VALID [SOLVED]

Posted: Thu Jan 22, 2009 12:50 pm
by pamelina
Hello,

When using 'startExpandCollapse' it fails to validate as XHTML VALID...

There is problem with '; in function.startExpandCollapse.php

Here is XHTML output ...

   1.   Error  Line 206, Column 32: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

     
example



     

      The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

      One possible cause for this message is that you have attempted to put a block-level element (such as "" or "") inside an inline element (such as "", "", or "").

Re: startExpandCollapse NOT XHTML VALID

Posted: Fri Jan 23, 2009 12:08 pm
by pamelina
Has anyone found a solution for above problem?

Re: startExpandCollapse NOT XHTML VALID

Posted: Fri Jan 23, 2009 3:08 pm
by Rolf
Hey Pamelina

perhaps you placed the tag between ...
A 'div' between 'p' isn't W3C valid.

®olf

Re: startExpandCollapse NOT XHTML VALID

Posted: Fri Jan 23, 2009 4:00 pm
by pamelina
Hi Rolf,

The problem is within function.startExpandCollapse.php ...
not with ... 

Re: startExpandCollapse NOT XHTML VALID

Posted: Fri Jan 23, 2009 4:04 pm
by KO
Or you might have 2 same ID's which is forbidden.

Re: startExpandCollapse NOT XHTML VALID

Posted: Fri Jan 23, 2009 5:06 pm
by Rolf
Hi Pamelina,

Perhaps you can give us a page url?


Had the same problem once. I can reproduce this error:
When I place the following line in a page, it isn't xhtml valid anymore.

Code: Select all

<p><div>rolf</div></p>

W3C output:
Line 144, Column 4: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
rolf
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "" or "") inside an inline element (such as "", "", or "").
In your case, the would be made by the {startExpandCollapse} tag...
The by TinyMCE?

greetz,

Rolf  :D

Re: startExpandCollapse NOT XHTML VALID

Posted: Sat Jan 24, 2009 11:08 pm
by tyman00
I will agree with Rolf here.

You are calling the {startExpandCollapse} tag inside of a paragraph. It is not valid to do so.

I will be it looks kind of like this in your source:

Code: Select all

<p> Text text text more text some more text <div id="answer" class="expand"><br />example<br /></div></p>

Try calling the tag after your paragraph.

Code: Select all

<p> Text text text more text some more text </p>
<div id="answer" class="expand"><br />example<br /></div>
It can also look like this in your administration area:

Code: Select all

<p>text text text text </p>
{startExpandCollapse}

Re: startExpandCollapse NOT XHTML VALID

Posted: Sun Jan 25, 2009 6:33 pm
by pamelina
Thank you all for your answers, I got it working, now I'm testing couple of js. to make it smooth opening ...