put this javascript into <head> of your page:
<script type="text/javascript">
f = function(){ColdFusion.Layout.collapseAccordion('accordionLayout',
'panel01');}
</script>
add this as the last line before the closing </body> tag:
<cfset ajaxonload('f')>
Azadi
On 27/05/2010 10:34, Seamus Campbell wrote:
> Hi
> I am using cflayout accordion with only one item which I want collapsed on
> page load.
> I've eventually put this code in:
> <body onload="ColdFusion.Layout.collapseAccordion('accordionLayout',
> 'panel01')">
>
> This works in FF and Chrome but NOT in IE8, which 1) does NOT open collapsed
> and 2) gives a javascript error
> Message: Exception thrown and not caught
> Line: 90
> Char: 1
> Code: 0
> URI: http://127.0.0.1:8500/CFIDE/scripts/ajax/package/cfajax.js
>
> So my questions are
> 1. Is using the onLoad function the best way to have the accordion closed on
> page load
> 2. How do I get it to work in IE? And with no errors?
> Hope someone can help - this is driving me nuts
> Ta
> Seamus
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334032
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm