Results 1 to 3 of 3

Thread: How invoke url from ext js 4 component.

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    23

    Question How invoke url from ext js 4 component.

    Hello, I would like to be able to invoke a url following a user selecting
    an ext js component (i.e. following user clicking on ext js button, toolbar,
    treepanel item, menu item). How can this be done? In html one can do
    <a href=url> for a link. (it's probably a simple question... but I'm not sure
    how it's done)


    Thank you,
    Bryan

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    You could use

    Code:
    window.open(URL,name,specs,replace)
    on the handler of the component. e.g. you could use this on the handler of your button and on click, it would open the url.

  3. #3
    Sencha User
    Join Date
    Feb 2010
    Posts
    125
    Answers
    7

    Default

    if the component (e.g. a button) has a handler property, you can configure a function which makes a document.location.href = 'yoururl'.

    alternatively you can make html: '<a href...' or you use tpl - a extjs template with an <a href...>... i prefer the latest, because the "components" behave like a html link and the user can bookmark the target.

Posting Permissions

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