1. #1
    Ext User
    Join Date
    Mar 2007
    Vote Rating
    angusf is on a distinguished road


    Default YAHOO.ext.Element.get().getAttribute() causes errors

    function sendPaneForm(p_form) {
    		var theForm = document.getElementById(p_form); // this works
    		// var theForm = YAHOO.ext.Element.get(p_form); // this DOES NOT WORK
    		var bottom = YAHOO.ext.Element.get('bottomPane');
        var updateMgr = bottom.getUpdateManager();
       		var failedLoad = function() {
                    bottom.update("Failed to send form");
       		var okLoad = function() {
       		updateMgr.formUpdate(theForm, null, true, null);
    The line commented out, using YAHOO.ext.Element.get() , causes an error to occur in yui-ext.32.1/yui-ext.js at line 123 where getAttribute is used to determine the enctype.

    Is there any way to use YAHOO.ext.Element to pass the form to the updateManager or do I need to revert to using document.getElementById

    I'm new to javascript but one of the reasons I understood using YUI & YUI.ext might be a good idea was to easily overcome browser compatibility problems. Is there any problem using getElementById or is there a way to get element attributes using YAHOO.ext.Element?

    Thanks for your help.

  2. #2
    Sencha User Frank's Avatar
    Join Date
    Mar 2007
    Vote Rating
    Frank is an unknown quantity at this point



    you should access the element's dom ,like this

Similar Threads

  1. YAHOO.ext.Element and addListener
    By alex1er in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 18 Feb 2007, 2:57 AM
  2. formUpdate getAttribute Error
    By Domitian in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 15 Feb 2007, 11:05 AM
  3. YAHOO.ext.Element.get
    By jclawson in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 7 Feb 2007, 10:04 AM
  4. YAHOO.ext.Element Display
    By ojintoad in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 1 Jan 2007, 2:20 AM

Thread Participants: 1