Just a quick question is there a quick way to sniff out the document type.
in other words:
if document type is HTML else if document type XHTML do that…
well thats what I’m trying to figure out in a quick way
is there a quick freeway method.
Any pointers would be really handy
cheeeers in advance
max :o)
Hi Max,
Rather than try and get the DocType for the page I’d be inclined to
look at the page output level which in turn will set the correct
DocType.
Try;
// Get the HTML level for this page
var thisPageHTMLLevel = fwPage.fwHTMLLevel;
// 1=3.2 2=3.2+css 3=4.01 4=xhtml transitional 5= xhtml strict
Regards,
Tim.
On 20 Oct 2010, at 21:55, max wrote:
Just a quick question is there a quick way to sniff out the document
type.
in other words:
if document type is HTML else if document type XHTML do that…
well thats what I’m trying to figure out in a quick way
is there a quick freeway method.
Any pointers would be really handy
cheeeers in advance
max :o)
Hi Stewart
I implemented the fwPage.fwHTMLLevel method last night… and it worked perfectly so its a shame it’s being deprecated :o(
Do you have a reference on how to use HTMLDocType property of the FWPage object, or has this been used recently on a action that I can have a butchers.
On the same note, will the fwPage.fwHTMLLevel be dropped completely from being recognised in future releases of Freeway and is this because of HTML5, or is it for some other reason…
Then finally… “I suppose again in similar same vein”: what other properties are likely to get the old size nine boot… :o)
Do you have a list and what we are to use as alternatives.
Do you have a reference on how to use HTMLDocType property of the
FWPage object, or has this been used recently on a action that I can
have a butchers.
Do you have a reference on how to use HTMLDocType property of the
FWPage object, or has this been used recently on a action that I
can have a butchers.
On the same note, will the fwPage.fwHTMLLevel be dropped completely from being recognised in future releases of Freeway and is this because of HTML5, or is it for some other reason…
We internally deprecated the use of this property some years ago because it led to some nastiness where there was reliance on the ordering of the values e.g. checking if the value was less than 4 for non-XHTML output types.
This wasn’t very forward-compatible because, for example, when we added HTML 4 Strict, the numerical value was higher than 4. We decided that it was better to use the doctype string for output level checks.
Having said this, we don’t have any plans to drop the fwHTMLLevel property completely so you’re welcome to use it. This is more of a recommended deprecation rather than a formal deprecation
Then finally… “I suppose again in similar same vein”: what other properties are likely to get the old size nine boot… :o)
The other properties that we have marked as deprecated are:
Just to follow up on those deprecated functions Stewart listed, here are some alternatives:
On 22 Oct 2010, at 10:31, stewart wrote:
The other properties that we have marked as deprecated are:
FWElement: fwIsInlined
fwIsInflow
fwIsInflowDiv
FWItem: fwIsOverflowed
fwIsPublished (check if an item is due to be published - there are many forms of overflow and the only relevant one to Actions is the kind that prevents an item from publishing)
FWFileParamPair: fwFullFileName
fwPathName (the name of the file with the path) or
fwFileName (the short file name)