javascript - Ext JS - How to Grok the Syntax -


i needed figure out how value of field on form within handler function didn't know how reference field , kept getting errors. spent time looking @ api, code examples , googling. found 1 example works (i imagine there others).

assuming form named myform , field 'myfield'

var myval = myform.getform().findfield("myfield").getvalue(); 

maybe i'm new @ this, don't think it's obvious looking @ api docs. question is, when you're trying figure out, what's approach.

thanks!

assuming have set id of field, can use ext.getcmp(id) have componentmanager up. there's ext.getdom(id) acts wrapper getelementbyid.

in addition, many event handler functions allow setting scope of function itself. documentation event should note object setting scope. may able set form field scope object , use this.getvalue() it's hard without knowing you're trying do.

to answer question @ hand: more code, more grok. ext js has bit of learning curve example source code provided in download great place start. there several errors , omissions in documentation though, authoritative place go answers straight source. reading on javascript callbacks doesn't hurt either.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -