• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    Build Tag: gallery-2011.10.27-17-03

    Return to InlineXHR(php)

    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2011.10.27-17-03'
    }).use('gallery-inline-xhr', function(Y) {
     
     
        //write something to use the response from the server
        Y.showResult = function (result) {
     
    					var r = Y.Node.create('<div>' + result + '</div>');
    					var resultWindow = Y.one("#result");
    					if(resultWindow.getStyle('backgroundColor') !== 'ivory'){
    						resultWindow.setStyle('width','300px');
    						resultWindow.setStyle('height','200px');
    						resultWindow.setStyle('overflowX','hidden');
    						resultWindow.setStyle('overflowY','auto');
    						resultWindow.setStyle('border','2px solid #cecece');
    						resultWindow.setStyle('padding','7px');
    						resultWindow.setStyle('backgroundColor','ivory');
    					}
    					resultWindow.append(r);
     
    				}
        //and a second func, just for fun
        var Y.alertResult = function(r){
               alert(r);
       }
     
     
        var xhr = new Y.Base.InlineXhr({method: 'POST'}); //configure and instantiate
     
       //decide which function you're going to execute on the server, pass data to it
      //in this case both a couple of manually set vars and the contents of a form
        var group1 = xhr.register("scriptGroup1", "myPhpFunction", "user=meUser&password=mySecret", "#form1");
     
        //send the POST request
        //note that the function group ("group1" here) must be passed as the context to the event handler
        Y.on("click", group1.request, "#requestButton", group1);
     
    //   On click both showResult and alertResult will be triggered by the response
     
    });

    Build Output

    /home/y/libexec/ant/bin/ant all
    Buildfile: build.xml
         [echo] Starting Build For gallery-inline-xhr
         [echo] Ant Properties
         [echo]     Home : /home/y/libexec/ant
         [echo]     Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008
         [echo]     Build File : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build.xml
         [echo] Local Build Properties
         [echo]     version : 3
         [echo]     srcdir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery
         [echo]     builddir : ../../../builder/componentbuild
         [echo]     component : gallery-inline-xhr
         [echo]     component.basefilename : gallery-inline-xhr
         [echo]     component.basedir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr
         [echo]     component.builddir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp
         [echo] Global Build Properties
         [echo]     global.build.base : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build
         [echo]     global.build.component : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr
         [echo]     global.build.component.assets : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr/assets
    
    clean:
    
    init:
        [mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp
         [echo] Starting Build For gallery-inline-xhr
         [echo] Ant Properties
         [echo]     Home : /home/y/libexec/ant
         [echo]     Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008
         [echo]     Build File : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build.xml
         [echo] Local Build Properties
         [echo]     version : 3
         [echo]     srcdir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery
         [echo]     builddir : ../../../builder/componentbuild
         [echo]     component : gallery-inline-xhr
         [echo]     component.basefilename : gallery-inline-xhr
         [echo]     component.basedir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr
         [echo]     component.builddir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp
         [echo] Global Build Properties
         [echo]     global.build.base : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build
         [echo]     global.build.component : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr
         [echo]     global.build.component.assets : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr/assets
    
    -lint-server:
         [echo] Starting Build For gallery-inline-xhr
         [echo] Ant Properties
         [echo]     Home : /home/y/libexec/ant
         [echo]     Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008
         [echo]     Build File : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build.xml
         [echo] Local Build Properties
         [echo]     version : 3
         [echo]     srcdir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery
         [echo]     builddir : ../../../builder/componentbuild
         [echo]     component : gallery-inline-xhr
         [echo]     component.basefilename : gallery-inline-xhr
         [echo]     component.basedir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr
         [echo]     component.builddir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp
         [echo] Global Build Properties
         [echo]     global.build.base : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build
         [echo]     global.build.component : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr
         [echo]     global.build.component.assets : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr/assets
    
    -node:
         [echo] For faster builds, install Node.js.
    
    -concatdebug:
         [echo] Concatenating
         [echo]     Source Files : inline-xhr.js
         [echo]     In Source Dir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/js
         [echo]     To : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr-debug.js
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/ant
       [delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/ant
    
    -registerdebug:
         [echo] Wrapping /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr-debug.js in YUI.add module
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp
    
    -prependdebug:
    
    -appenddebug:
    
    builddebug:
    
    -createcore:
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp
    
    -loggerregex:
         [echo] Replacing Logger Statements in /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr.js
    
    buildcore:
    
    -rollupjs:
    
    -concatskins:
    
    -buildskins:
    
    -rollupcss:
    
    buildskins:
    
    -buildlangs:
    
    -rolluplangs:
    
    buildlangs:
    
    build:
    
    minify:
    [yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr.js
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] args.splice(0,2); ---> var  <--- c=args.shift();this.
    [yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr-min.js
    
    lint:
         [echo] Using Rhino. Install nodejs to improve jslint speed, or skip with -Dlint.skip=true
         [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr-debug.js
         [java]  
         [java] 
         [java] 	94, 20: 'ex' is already defined.
         [java] 	}catch(ex){
         [java] 
         [java] 	188, 17: Expected an identifier and instead saw 'arguments' (a reserved word).
         [java] 	arguments: {
         [java] 
         [java]  
         [java] 
         [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr-min.js
         [java]  
         [java] 
         [java] 	1, 1084: 'O' is already defined.
         [java] 	[Code Evidence Omitted: Greater than 500 chars]
         [java] 
         [java] 	1, 2228: Expected an identifier and instead saw 'arguments' (a reserved word).
         [java] 	[Code Evidence Omitted: Greater than 500 chars]
         [java] 
         [java]  
         [java] 
         [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr.js
         [java]  
         [java] 
         [java] 	93, 20: 'ex' is already defined.
         [java] 	}catch(ex){
         [java] 
         [java] 	187, 17: Expected an identifier and instead saw 'arguments' (a reserved word).
         [java] 	arguments: {
         [java] 
         [java]  
         [java] 
    
    local:
    
    deploybuild:
         [copy] Copying 3 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr
         [copy] Copying /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr.js to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr/gallery-inline-xhr.js
         [copy] Copying /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr-debug.js to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr/gallery-inline-xhr-debug.js
         [copy] Copying /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-inline-xhr/build_tmp/gallery-inline-xhr-min.js to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-inline-xhr/gallery-inline-xhr-min.js
    
    deployassets:
    
    deployskins:
    
    deploylang:
    
    deploydocs:
    
    deploy:
    
    all:
    
    BUILD SUCCESSFUL
    Total time: 3 seconds

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info