External JS

I have had a look at the source code FW produces and when IE
Compatability is turned on there’s a big chunk of Javascript inserted,
I have tried copying that (then turning IE compatability to normal)
and putting the copied code into an external .js file, then used the
External JS action to re-insert it into /head, but my css layered
items are geting messed up.

I may well go back over the layered items and do them in a different
way to get round the problem. So it’s not a biggy, just wondered if
anyone else tried to do this and been successful?

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Nathan,

The link to the script needs to go in a conditional block that looks
for the version of IE. You can enter this manually in the Page>HTML
Markup dialog making sure you select "Before ", like so:

<!--[if lte IE 6]>
<script language="javascript" type="text/javascript" src="path/to/ 
file.js"></script>
<![endif]-->
~~~~

Joe


On 15 Jun 2009, at 11:21, Nathan Garner wrote:

> I have had a look at the source code FW produces and when IE  
> Compatability is turned on there's a big chunk of Javascript  
> inserted, I have tried copying that (then turning IE compatability  
> to normal) and putting the copied code into an external .js file,  
> then used the External JS action to re-insert it into /head, but my  
> css layered items are geting messed up.
>
> I may well go back over the layered items and do them in a different  
> way to get round the problem. So it's not a biggy, just wondered if  
> anyone else tried to do this and been successful?
>
> <script type="text/javascript">
> //<![CDATA[
> function FWAddClassNames(node)
> {
> 	if(FWIsListItem(node, "items"))
> 	{
> 		var depth = FWFindDepth(node);
> 		node.onmouseover=function() { this.className+=' over'+(depth ==  
> 1?'':(depth-1));
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "fwSub"+depth:""; }
> 		node.onmouseout=function()  
> { this.className=this.className.replace(' over'+(depth ==  
> 1?'':depth-1), "");
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id = "":""; }
> 	}
> 	if(node.nextSibling)
> 		FWAddClassNames(node.nextSibling);
> }
>
> function FWIsListItem(node, listType)
> {
> 	var blocks = ["UL", "OL", "DL"];
> 	var items = ["LI", "DD"];
> 	if(listType == "blocks")
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else if(listType == "items")
> 	{
> 		if(items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1 ||  
> items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	return false;
> }
>
> function FWFindDepth(node)
> {
> 	currentNode = node;
> 	depth = 0;
> 	while(FWIsListItem(currentNode.parentNode, "all"))
> 	{
> 		if(FWIsListItem(currentNode.parentNode, "blocks"))
> 			depth++;
> 		currentNode = currentNode.parentNode;
> 	}
> 	return depth;
> }
>
> function FWStartList()
> {
> 	var listTypes = ['OL','UL','DL'];
> 	var nodes = [];
> 	for(i=0; i<3; i++)
> 	{
> 		var temp = document.getElementsByTagName(listTypes[i]);
> 		for(var j = 0;j<temp.length;j++)
> 			if(FWIsListItem(temp[j], "blocks"))
> 				nodes.push(temp[j]);
> 	}
> 	for(i=0; i<nodes.length; i++)
> 		FWAddClassNames(nodes[i].firstChild);
> }
> window.onload = function(){ FWStartList(); }
> //]]>
> </script>
>
>
> Nathan Garner
> Partner
>
> Austin Wells Design Consultants
> 1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
> +44 (0)1202 301271
> email@hidden
> http://www.awdc-creative.com
> -----------------------------------------------------------------------
> Member of NAPP
>
>
>
>
> _______________________________________________
> freewaytalk mailing list
> email@hidden
> Update your subscriptions at:
> http://freewaytalk.net/person/options


_______________________________________________
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Aha… Thanks Joe - I should have though about that.

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 15 Jun 2009, at 13:44, Joe Billings wrote:

Hi Nathan,

The link to the script needs to go in a conditional block that looks
for the version of IE. You can enter this manually in the Page>HTML
Markup dialog making sure you select "Before ", like so:

<!--[if lte IE 6]>
<script language="javascript" type="text/javascript" src="path/to/ 
file.js"></script>
<![endif]-->
~~~~

Joe


On 15 Jun 2009, at 11:21, Nathan Garner wrote:

> I have had a look at the source code FW produces and when IE  
> Compatability is turned on there's a big chunk of Javascript  
> inserted, I have tried copying that (then turning IE compatability  
> to normal) and putting the copied code into an external .js file,  
> then used the External JS action to re-insert it into /head, but my  
> css layered items are geting messed up.
>
> I may well go back over the layered items and do them in a  
> different way to get round the problem. So it's not a biggy, just  
> wondered if anyone else tried to do this and been successful?
>
> <script type="text/javascript">
> //<![CDATA[
> function FWAddClassNames(node)
> {
> 	if(FWIsListItem(node, "items"))
> 	{
> 		var depth = FWFindDepth(node);
> 		node.onmouseover=function() { this.className+=' over'+(depth ==  
> 1?'':(depth-1));
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "fwSub"+depth:""; }
> 		node.onmouseout=function()  
> { this.className=this.className.replace(' over'+(depth ==  
> 1?'':depth-1), "");
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "":""; }
> 	}
> 	if(node.nextSibling)
> 		FWAddClassNames(node.nextSibling);
> }
>
> function FWIsListItem(node, listType)
> {
> 	var blocks = ["UL", "OL", "DL"];
> 	var items = ["LI", "DD"];
> 	if(listType == "blocks")
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else if(listType == "items")
> 	{
> 		if(items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1 ||  
> items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	return false;
> }
>
> function FWFindDepth(node)
> {
> 	currentNode = node;
> 	depth = 0;
> 	while(FWIsListItem(currentNode.parentNode, "all"))
> 	{
> 		if(FWIsListItem(currentNode.parentNode, "blocks"))
> 			depth++;
> 		currentNode = currentNode.parentNode;
> 	}
> 	return depth;
> }
>
> function FWStartList()
> {
> 	var listTypes = ['OL','UL','DL'];
> 	var nodes = [];
> 	for(i=0; i<3; i++)
> 	{
> 		var temp = document.getElementsByTagName(listTypes[i]);
> 		for(var j = 0;j<temp.length;j++)
> 			if(FWIsListItem(temp[j], "blocks"))
> 				nodes.push(temp[j]);
> 	}
> 	for(i=0; i<nodes.length; i++)
> 		FWAddClassNames(nodes[i].firstChild);
> }
> window.onload = function(){ FWStartList(); }
> //]]>
> </script>
>
>
> Nathan Garner
> Partner
>
> Austin Wells Design Consultants
> 1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
> +44 (0)1202 301271
> email@hidden
> http://www.awdc-creative.com
> -----------------------------------------------------------------------
> Member of NAPP
>
>
>
>
> _______________________________________________
> freewaytalk mailing list
> email@hidden
> Update your subscriptions at:
> http://freewaytalk.net/person/options


_______________________________________________
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The external JS action puts this ref in:

Would I also, need to put the link you mentioned below in? Or do I not
need the external JOS action applied if I’m going to use just the link
below.

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 15 Jun 2009, at 13:44, Joe Billings wrote:

Hi Nathan,

The link to the script needs to go in a conditional block that looks
for the version of IE. You can enter this manually in the Page>HTML
Markup dialog making sure you select "Before ", like so:

<!--[if lte IE 6]>
<script language="javascript" type="text/javascript" src="path/to/ 
file.js"></script>
<![endif]-->
~~~~

Joe


On 15 Jun 2009, at 11:21, Nathan Garner wrote:

> I have had a look at the source code FW produces and when IE  
> Compatability is turned on there's a big chunk of Javascript  
> inserted, I have tried copying that (then turning IE compatability  
> to normal) and putting the copied code into an external .js file,  
> then used the External JS action to re-insert it into /head, but my  
> css layered items are geting messed up.
>
> I may well go back over the layered items and do them in a  
> different way to get round the problem. So it's not a biggy, just  
> wondered if anyone else tried to do this and been successful?
>
> <script type="text/javascript">
> //<![CDATA[
> function FWAddClassNames(node)
> {
> 	if(FWIsListItem(node, "items"))
> 	{
> 		var depth = FWFindDepth(node);
> 		node.onmouseover=function() { this.className+=' over'+(depth ==  
> 1?'':(depth-1));
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "fwSub"+depth:""; }
> 		node.onmouseout=function()  
> { this.className=this.className.replace(' over'+(depth ==  
> 1?'':depth-1), "");
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "":""; }
> 	}
> 	if(node.nextSibling)
> 		FWAddClassNames(node.nextSibling);
> }
>
> function FWIsListItem(node, listType)
> {
> 	var blocks = ["UL", "OL", "DL"];
> 	var items = ["LI", "DD"];
> 	if(listType == "blocks")
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else if(listType == "items")
> 	{
> 		if(items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1 ||  
> items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	return false;
> }
>
> function FWFindDepth(node)
> {
> 	currentNode = node;
> 	depth = 0;
> 	while(FWIsListItem(currentNode.parentNode, "all"))
> 	{
> 		if(FWIsListItem(currentNode.parentNode, "blocks"))
> 			depth++;
> 		currentNode = currentNode.parentNode;
> 	}
> 	return depth;
> }
>
> function FWStartList()
> {
> 	var listTypes = ['OL','UL','DL'];
> 	var nodes = [];
> 	for(i=0; i<3; i++)
> 	{
> 		var temp = document.getElementsByTagName(listTypes[i]);
> 		for(var j = 0;j<temp.length;j++)
> 			if(FWIsListItem(temp[j], "blocks"))
> 				nodes.push(temp[j]);
> 	}
> 	for(i=0; i<nodes.length; i++)
> 		FWAddClassNames(nodes[i].firstChild);
> }
> window.onload = function(){ FWStartList(); }
> //]]>
> </script>
>
>
> Nathan Garner
> Partner
>
> Austin Wells Design Consultants
> 1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
> +44 (0)1202 301271
> email@hidden
> http://www.awdc-creative.com
> -----------------------------------------------------------------------
> Member of NAPP
>
>
>
>
> _______________________________________________
> freewaytalk mailing list
> email@hidden
> Update your subscriptions at:
> http://freewaytalk.net/person/options


_______________________________________________
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

All you need is:

<!--[if lte IE 6]>
<script src="Resources/home.js" language="JavaScript" type="text/ 
javascript"></script>
<![endif]-->

You don’t need to use the JavaScript Action unless you want to link to
another JavaScript file other than the IE6 fixes.

Joe

On 15 Jun 2009, at 14:06, Nathan Garner wrote:

The external JS action puts this ref in:

Would I also, need to put the link you mentioned below in? Or do I
not need the external JOS action applied if I’m going to use just
the link below.

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 15 Jun 2009, at 13:44, Joe Billings wrote:

Hi Nathan,

The link to the script needs to go in a conditional block that
looks for the version of IE. You can enter this manually in the
Page>HTML Markup dialog making sure you select "Before ",
like so:

<!--[if lte IE 6]>
<script language="javascript" type="text/javascript" src="path/to/ 
file.js"></script>
<![endif]-->
~~~~

Joe


On 15 Jun 2009, at 11:21, Nathan Garner wrote:

> I have had a look at the source code FW produces and when IE  
> Compatability is turned on there's a big chunk of Javascript  
> inserted, I have tried copying that (then turning IE compatability  
> to normal) and putting the copied code into an external .js file,  
> then used the External JS action to re-insert it into /head, but  
> my css layered items are geting messed up.
>
> I may well go back over the layered items and do them in a  
> different way to get round the problem. So it's not a biggy, just  
> wondered if anyone else tried to do this and been successful?
>
> <script type="text/javascript">
> //<![CDATA[
> function FWAddClassNames(node)
> {
> 	if(FWIsListItem(node, "items"))
> 	{
> 		var depth = FWFindDepth(node);
> 		node.onmouseover=function() { this.className+=' over'+(depth ==  
> 1?'':(depth-1));
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "fwSub"+depth:""; }
> 		node.onmouseout=function()  
> { this.className=this.className.replace(' over'+(depth ==  
> 1?'':depth-1), "");
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "":""; }
> 	}
> 	if(node.nextSibling)
> 		FWAddClassNames(node.nextSibling);
> }
>
> function FWIsListItem(node, listType)
> {
> 	var blocks = ["UL", "OL", "DL"];
> 	var items = ["LI", "DD"];
> 	if(listType == "blocks")
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else if(listType == "items")
> 	{
> 		if(items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1 ||  
> items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	return false;
> }
>
> function FWFindDepth(node)
> {
> 	currentNode = node;
> 	depth = 0;
> 	while(FWIsListItem(currentNode.parentNode, "all"))
> 	{
> 		if(FWIsListItem(currentNode.parentNode, "blocks"))
> 			depth++;
> 		currentNode = currentNode.parentNode;
> 	}
> 	return depth;
> }
>
> function FWStartList()
> {
> 	var listTypes = ['OL','UL','DL'];
> 	var nodes = [];
> 	for(i=0; i<3; i++)
> 	{
> 		var temp = document.getElementsByTagName(listTypes[i]);
> 		for(var j = 0;j<temp.length;j++)
> 			if(FWIsListItem(temp[j], "blocks"))
> 				nodes.push(temp[j]);
> 	}
> 	for(i=0; i<nodes.length; i++)
> 		FWAddClassNames(nodes[i].firstChild);
> }
> window.onload = function(){ FWStartList(); }
> //]]>
> </script>
>
>
> Nathan Garner
> Partner
>
> Austin Wells Design Consultants
> 1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
> +44 (0)1202 301271
> email@hidden
> http://www.awdc-creative.com
> -----------------------------------------------------------------------
> Member of NAPP
>
>
>
>
> _______________________________________________
> freewaytalk mailing list
> email@hidden
> Update your subscriptions at:
> http://freewaytalk.net/person/options


_______________________________________________
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Perfect… Thank you.

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 15 Jun 2009, at 14:29, Joe Billings wrote:

All you need is:

<!--[if lte IE 6]>
<script src="Resources/home.js" language="JavaScript" type="text/ 
javascript"></script>
<![endif]-->

You don’t need to use the JavaScript Action unless you want to link
to another JavaScript file other than the IE6 fixes.

Joe

On 15 Jun 2009, at 14:06, Nathan Garner wrote:

The external JS action puts this ref in:

Would I also, need to put the link you mentioned below in? Or do I
not need the external JOS action applied if I’m going to use just
the link below.

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 15 Jun 2009, at 13:44, Joe Billings wrote:

Hi Nathan,

The link to the script needs to go in a conditional block that
looks for the version of IE. You can enter this manually in the
Page>HTML Markup dialog making sure you select "Before ",
like so:

<!--[if lte IE 6]>
<script language="javascript" type="text/javascript" src="path/to/ 
file.js"></script>
<![endif]-->
~~~~

Joe


On 15 Jun 2009, at 11:21, Nathan Garner wrote:

> I have had a look at the source code FW produces and when IE  
> Compatability is turned on there's a big chunk of Javascript  
> inserted, I have tried copying that (then turning IE  
> compatability to normal) and putting the copied code into an  
> external .js file, then used the External JS action to re-insert  
> it into /head, but my css layered items are geting messed up.
>
> I may well go back over the layered items and do them in a  
> different way to get round the problem. So it's not a biggy, just  
> wondered if anyone else tried to do this and been successful?
>
> <script type="text/javascript">
> //<![CDATA[
> function FWAddClassNames(node)
> {
> 	if(FWIsListItem(node, "items"))
> 	{
> 		var depth = FWFindDepth(node);
> 		node.onmouseover=function() { this.className+=' over'+(depth ==  
> 1?'':(depth-1));
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "fwSub"+depth:""; }
> 		node.onmouseout=function()  
> { this.className=this.className.replace(' over'+(depth ==  
> 1?'':depth-1), "");
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "":""; }
> 	}
> 	if(node.nextSibling)
> 		FWAddClassNames(node.nextSibling);
> }
>
> function FWIsListItem(node, listType)
> {
> 	var blocks = ["UL", "OL", "DL"];
> 	var items = ["LI", "DD"];
> 	if(listType == "blocks")
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else if(listType == "items")
> 	{
> 		if(items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1 ||  
> items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	return false;
> }
>
> function FWFindDepth(node)
> {
> 	currentNode = node;
> 	depth = 0;
> 	while(FWIsListItem(currentNode.parentNode, "all"))
> 	{
> 		if(FWIsListItem(currentNode.parentNode, "blocks"))
> 			depth++;
> 		currentNode = currentNode.parentNode;
> 	}
> 	return depth;
> }
>
> function FWStartList()
> {
> 	var listTypes = ['OL','UL','DL'];
> 	var nodes = [];
> 	for(i=0; i<3; i++)
> 	{
> 		var temp = document.getElementsByTagName(listTypes[i]);
> 		for(var j = 0;j<temp.length;j++)
> 			if(FWIsListItem(temp[j], "blocks"))
> 				nodes.push(temp[j]);
> 	}
> 	for(i=0; i<nodes.length; i++)
> 		FWAddClassNames(nodes[i].firstChild);
> }
> window.onload = function(){ FWStartList(); }
> //]]>
> </script>
>
>
> Nathan Garner
> Partner
>
> Austin Wells Design Consultants
> 1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
> +44 (0)1202 301271
> email@hidden
> http://www.awdc-creative.com
> -----------------------------------------------------------------------
> Member of NAPP
>
>
>
>
> _______________________________________________
> freewaytalk mailing list
> email@hidden
> Update your subscriptions at:
> http://freewaytalk.net/person/options


_______________________________________________
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Is this something that can be achieved with Max’s action

http://actionsforge.com/actions/view/163-script-action-set


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So this is what I did… (it may well be completely wrong but would be
good to know if it’s close)

  1. Turned IE compatability to normal.

  2. Pasted this into the /head html markup:

  1. Placed this home.js file into the Resources folder online:

//<![CDATA[
function FWAddClassNames(node)
{
if(FWIsListItem(node, “items”))
{
var depth = FWFindDepth(node);
node.onmouseover=function() { this.className+=’ over’+(depth == 1?’’:
(depth-1));
FWIsListItem(this.lastChild, “blocks”)?this.lastChild.id =
“fwSub”+depth:""; }
node.onmouseout=function() { this.className=this.className.replace(’
over’+(depth == 1?’’:depth-1), “”);
FWIsListItem(this.lastChild, “blocks”)?this.lastChild.id = “”:""; }
}
if(node.nextSibling)
FWAddClassNames(node.nextSibling);
}

function FWIsListItem(node, listType)
{
var blocks = [“UL”, “OL”, “DL”];
var items = [“LI”, “DD”];
if(listType == “blocks”)
{
if(blocks.toString().search(node.nodeName) != -1)
return true;
}
else if(listType == “items”)
{
if(items.toString().search(node.nodeName) != -1)
return true;
}
else
{
if(blocks.toString().search(node.nodeName) != -1 ||
items.toString().search(node.nodeName) != -1)
return true;
}
return false;
}

function FWFindDepth(node)
{
currentNode = node;
depth = 0;
while(FWIsListItem(currentNode.parentNode, “all”))
{
if(FWIsListItem(currentNode.parentNode, “blocks”))
depth++;
currentNode = currentNode.parentNode;
}
return depth;
}

function FWStartList()
{
var listTypes = [‘OL’,‘UL’,‘DL’];
var nodes = [];
for(i=0; i<3; i++)
{
var temp = document.getElementsByTagName(listTypes[i]);
for(var j = 0;j<temp.length;j++)
if(FWIsListItem(temp[j], “blocks”))
nodes.push(temp[j]);
}
for(i=0; i<nodes.length; i++)
FWAddClassNames(nodes[i].firstChild);
}
window.onload = function(){ FWStartList(); }
//]]>


The test page can be viewed:
http://www.awdc-creative.com/clients/newyou/ie6/index.html

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 15 Jun 2009, at 14:29, Joe Billings wrote:

All you need is:

<!--[if lte IE 6]>
<script src="Resources/home.js" language="JavaScript" type="text/ 
javascript"></script>
<![endif]-->

You don’t need to use the JavaScript Action unless you want to link
to another JavaScript file other than the IE6 fixes.

Joe

On 15 Jun 2009, at 14:06, Nathan Garner wrote:

The external JS action puts this ref in:

Would I also, need to put the link you mentioned below in? Or do I
not need the external JOS action applied if I’m going to use just
the link below.

Nathan Garner
Partner

Austin Wells Design Consultants
1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
+44 (0)1202 301271
email@hidden
http://www.awdc-creative.com

Member of NAPP

On 15 Jun 2009, at 13:44, Joe Billings wrote:

Hi Nathan,

The link to the script needs to go in a conditional block that
looks for the version of IE. You can enter this manually in the
Page>HTML Markup dialog making sure you select "Before ",
like so:

<!--[if lte IE 6]>
<script language="javascript" type="text/javascript" src="path/to/ 
file.js"></script>
<![endif]-->
~~~~

Joe


On 15 Jun 2009, at 11:21, Nathan Garner wrote:

> I have had a look at the source code FW produces and when IE  
> Compatability is turned on there's a big chunk of Javascript  
> inserted, I have tried copying that (then turning IE  
> compatability to normal) and putting the copied code into an  
> external .js file, then used the External JS action to re-insert  
> it into /head, but my css layered items are geting messed up.
>
> I may well go back over the layered items and do them in a  
> different way to get round the problem. So it's not a biggy, just  
> wondered if anyone else tried to do this and been successful?
>
> <script type="text/javascript">
> //<![CDATA[
> function FWAddClassNames(node)
> {
> 	if(FWIsListItem(node, "items"))
> 	{
> 		var depth = FWFindDepth(node);
> 		node.onmouseover=function() { this.className+=' over'+(depth ==  
> 1?'':(depth-1));
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "fwSub"+depth:""; }
> 		node.onmouseout=function()  
> { this.className=this.className.replace(' over'+(depth ==  
> 1?'':depth-1), "");
> 			FWIsListItem(this.lastChild, "blocks")?this.lastChild.id =  
> "":""; }
> 	}
> 	if(node.nextSibling)
> 		FWAddClassNames(node.nextSibling);
> }
>
> function FWIsListItem(node, listType)
> {
> 	var blocks = ["UL", "OL", "DL"];
> 	var items = ["LI", "DD"];
> 	if(listType == "blocks")
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else if(listType == "items")
> 	{
> 		if(items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	else
> 	{
> 		if(blocks.toString().search(node.nodeName) != -1 ||  
> items.toString().search(node.nodeName) != -1)
> 			return true;
> 	}
> 	return false;
> }
>
> function FWFindDepth(node)
> {
> 	currentNode = node;
> 	depth = 0;
> 	while(FWIsListItem(currentNode.parentNode, "all"))
> 	{
> 		if(FWIsListItem(currentNode.parentNode, "blocks"))
> 			depth++;
> 		currentNode = currentNode.parentNode;
> 	}
> 	return depth;
> }
>
> function FWStartList()
> {
> 	var listTypes = ['OL','UL','DL'];
> 	var nodes = [];
> 	for(i=0; i<3; i++)
> 	{
> 		var temp = document.getElementsByTagName(listTypes[i]);
> 		for(var j = 0;j<temp.length;j++)
> 			if(FWIsListItem(temp[j], "blocks"))
> 				nodes.push(temp[j]);
> 	}
> 	for(i=0; i<nodes.length; i++)
> 		FWAddClassNames(nodes[i].firstChild);
> }
> window.onload = function(){ FWStartList(); }
> //]]>
> </script>
>
>
> Nathan Garner
> Partner
>
> Austin Wells Design Consultants
> 1 Elmgate Drive, Littledown, Bournemouth BH7 7EF
> +44 (0)1202 301271
> email@hidden
> http://www.awdc-creative.com
> -----------------------------------------------------------------------
> Member of NAPP
>
>
>
>
> _______________________________________________
> freewaytalk mailing list
> email@hidden
> Update your subscriptions at:
> http://freewaytalk.net/person/options


_______________________________________________
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options