Page 1 of 4 123 ... LastLast
Results 1 to 10 of 39

Thread: Dynamic Form submit

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    188

    Default Dynamic Form submit

    i get a "CN has no properties" error when i try to submit this form. here's the script:

    Ext.onReady( function () {
    var FormLogin = new Ext.form.Form( {
    labelWidth: 50,
    url: 'index.cfm'
    });
    FormLogin.add(
    new Ext.form.TextField( {
    fieldLabel: 'Passwort',
    name: 'Passwort',
    inputType: 'password',
    width:195,
    allowBlank:false
    })
    );
    FormLogin.addButton( 'Einloggen', function () {
    FormLogin.submit();
    });
    FormLogin.render( "LoginBoxForm" );
    });

  2. #2
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    188

    Default

    i'm actually trying to just do a standard, "old school" form submit that posts the form to the next page without any background processing from Ext. any help on this? thanks in advance!

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    188

    Default

    Semi-solved with some help from here, by setting the button to:
    FormLogin.addButton( 'Login', function () {
    document.getElementById( 'ext-gen2' ).submit();
    });

    I still don't get how to get the ID of the dynamically generated Form though. i tried adding baseParams: { id: 'FormLogin' } to creation parameters, but that doesn't seem to affect anything. anyone know how to get/set the ID of a dynamic form?

  4. #4
    Ext User vbert's Avatar
    Join Date
    Mar 2007
    Location
    Poland, Chojnice
    Posts
    19

    Default

    This code:

    Code:
    [...]
    FL = new Ext.form.Form({
    	id: 'formLogin',
    	labelWidth: 115,
    	url: '{form_url}',
    });
    [...]
    generate:

    Code:
    [...]
    <form id="formLogin" class="x-form" method="post">
    	<div id="formLogin" class="x-form-ct">
    	--------^^^^^^ this is BUG ???
    		<fieldset id="ext-comp-1003">
    [...]

  5. #5
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    188

    Default

    sounds like a bug to me, this makes the form not selectable by its ID after all.
    i'll file it in the Bugs forum, thanks!

  6. #6
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    germany
    Posts
    52

    Default

    I experienced the same behavior some minutes ago

    I need an UNIQUE id/name for my form to call an xajax function that makes my ajax requests. Are there any workarounds/solutions out yet?

  7. #7
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    Had to fudge some things but got it to work. In fact, i now have a working extjs oldschool + enctype multi-part for.


    http://extjs.com/forum/showpost.php?p=23736&postcount=3

  8. #8
    Ext User vbert's Avatar
    Join Date
    Mar 2007
    Location
    Poland, Chojnice
    Posts
    19

    Default

    At I not work

  9. #9
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    are you doing a form.submit from extjs?

  10. #10
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    188

    Default

    i added the form to the body <form name="FormLogin" id="FormLogin" action="index.cfm" method="post"></form> and then added the Ext.form like this: var FormLogin = new Ext.form.Form( "FormLogin", { });
    then you can do a submit via document.FormLogin.submit();

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •