1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    23
    Vote Rating
    0
    JC is on a distinguished road

      0  

    Default Basic Dialog and form submit

    Basic Dialog and form submit


    Hi Folks,

    I am trying to wrap a form around a basic dialog so that when the user clicks the submit button the form is submitted as per it's defined action. The following is my code, I am pretty new to this stuff but I have a feeling I am being very optimistic thinking this code would work. What I was hoping is that the 'runprogram.php' would be called, but it doesn't appear to be.

    Code:
    var SubmitForm = function() {
    	     var tform = getEl('test');
    	    tform.submit;
    	//	vardiaProgram.hide();
         }; 	
    
    function init (){
        vardiaProgram = new YAHOO.ext.BasicDialog("diaProgram",
           {modal:true,autoTabs:true,width:500,height:300,shadow:true,minWidth:300,minHeight:300
      });
    vardiaProgram.addButton('Submit', SubmitForm);
    vardiaProgram.show();
    }
    YAHOO.util.Event.addListener(window, "load", init);
    </script>
    
    <body>
    <form id="test"  method="POST" action="http://localhost/jc/php/runprogram.php">
    <div id="diaProgram" style=";visibility:hidden">
    <div class="ydlg-hd">Add Dialog</div>
    <div class="ydlg-bd">
    <label for="fldField1"> Enter this:</label> <input id="fldField1" />
    </div>
    <div class="ydlg-ft"></div>
    </div>
    </form>



    TIA,
    JC

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    tform.submit <- missing parens ???

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    23
    Vote Rating
    0
    JC is on a distinguished road

      0  

    Default


    Thanks for the reply,

    but I already tried that and I get an "object does not support this property or method" error.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Well since you coded tform.submit, my first thought would have been that you read the docs/looked at the source code and found a (new) function that was added to the library. Since adding parens says that there is no function called submit, at least I know that I miss a new addition to the library.

    I would suggest you search the forums for examples using UpdateManager which is one way to make a call to another page. Or, you could just use the base yui methods in the Connection class to do a request. I don't have the code in front of me know - I think the method is asyncRequest

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    23
    Vote Rating
    0
    JC is on a distinguished road

      0  

    Default resolved

    resolved


    Thanks for your help Tim,

    As you suggested I used the Yahoo connection class to get this working
    (http://www.yui-ext.com/forum/viewtop...=dialog+submit)

    JC

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    tform.dom.submit()

    getEl() returns a YAHOO.ext.Element

Similar Threads

  1. how to submit a form split over several tabs?
    By raphinou in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 1 Jun 2007, 7:20 AM
  2. ID of submit within form masks submit function
    By aconran in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 19 Feb 2007, 12:08 AM
  3. Basic Dialog Form plus submit example?
    By rob30UK in forum Ext 1.x: Help & Discussion
    Replies: 26
    Last Post: 13 Jan 2007, 9:11 AM
  4. BasicDialog: how to submit a form without AJAX.
    By moraes in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jan 2007, 7:02 AM
  5. BasicDialog with one TabPanelItem a try to submit form
    By JuanParraC in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 4 Dec 2006, 12:15 AM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi