YUI3_config not defined

Author Message

Mischa Markus

Wednesday 20 January 2010 3:15:32 am

heya, I get this style error in IE...

I am using ez4.2 with ezwebin, tried to override the ezjscore folder with ezjscore-1.0.1-2 and tried to use

{ezscript_require( 'ezjsc::yui3' )}
<script type="text/javascript">
{literal}
YUI( YUI3_config ).use('node', 'io-ez', function( Y )
{
 Y.on( "contentready", function( e )
 {
 // Parameters can be sent as post data ('arg1=hi!') or as 
 // call parameter (eg: "ezjscdemo::search::hello" )
 // Use post for string values to not end up reaching url path limit..
 Y.io.ez( 'ezjscdemo::search', {
 data: 'arg1=hi!',
 on: {success: function( id,r )
 { 
 if ( r.responseJSON.error_text )
 Y.get( '#hello-world-id' ).setContent(
 r.responseJSON.error_text
 );
 else
 Y.get( '#hello-world-id' ).setContent(
 r.responseJSON.content
 );
 }
 }
 });
 }, '#hello-world-id' );
});
{/literal}
</script>

without my scipts but without success, YUI( YUI3_config ) produced always this error in IE... thanks for help!

------------------------------

if I use this, I get "object expected"

<script type="text/javascript">
{literal}
var YUILoader = new YAHOO.util.YUILoader({
loadOptional: true,
combine: true
});
{/literal}
</script>
<script type="text/javascript" src={"lib/yui/3.0/build/yui/yui-min.js"|ezdesign}></script>
<script type="text/javascript">
{literal}
var YUI3_config = { modules: {} };
{/literal}
</script>

Laurent Dorier

Thursday 28 January 2010 5:08:54 am

Check this issue:

http://issues.ez.no/IssueView.php?Id=15729

It solved the problem for me. ;)

Mischa Markus

Wednesday 03 February 2010 7:06:39 am

yeah, if ( window.YUI !== undefined ) YUI( YUI3_config ) do it...

so simple... thanks =)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.