Results 1 to 4 of 4

Thread: Ext.get called by different tags

  1. #1

    Default Ext.get called by different tags

    Hello !

    I'm a beginner with ext and I would like to know if it's possible to capture events comming from different tags with common ids. My ids are like that : myid01, myid02... but I just know in advance the common part "myid" (the rest is built by JSF).
    Is it possible to write a method like this : Ext.get('myid*') ?

    Thanks in advance !
    Grunvald

  2. #2
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831

    Default

    you could use the Ext.select() function to gather those elements first then do some stuff on them.

    I'm not quite fluent with Regexes in the syntax for the select though:

    as far as I know this will give you every div that has the foo class.
    Code:
    Ext.select("div.foo");
    so there might be a way to something like :

    Code:
    Ext.select("#myid+regex-to-check-numbers-afterward");

  3. #3
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831

    Default

    efege hinted me on that one!

    Code:
    Ext.select("div[id^='myid']")
    E[foo^="bar"]: an E element whose "foo" attribute value begins exactly with the string "bar"
    references : http://www.w3.org/TR/css3-selectors/

  4. #4

    Default

    It works ! many thanks for your help !

Posting Permissions

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