1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    1
    MrBeef is on a distinguished road

      0  

    Default Linking map InfoWindow to Sencha function

    Linking map InfoWindow to Sencha function


    Hi all,

    I'm trying to place a link in a Google Maps InfoWindow that, when clicked, performs a function in Sencha Touch. Specifically, when clicked, I want to switch to another tab and populate a form.

    My function to perform the tab switch (this will also populate a form):
    Code:
    function windowLink()
        {
            tabs.setActiveItem(2);
        }
    Then in my InfoWindow content variable I create the following link, but it doesn't seem to work when clicked. I've also tried using the onclick property but with no luck. I would appreciate any suggestions, thanks!

    Code:
    var content = "<a href=\"javascript:windowLink();\">some text</a>";

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    253
    Vote Rating
    0
    ci11111 is on a distinguished road

      0  

    Default


    not sure it's the best solution
    but you will have to put outside Ext.application
    var windowLink ;

    then inside your app:
    Code:
    windowLink = function()
        {
            tabs.setActiveItem(2);
        }
    and finally in your infowindow:
    '<a href="javascript:windowLink();">some text</a>'

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Vote Rating
    1
    MrBeef is on a distinguished road

      0  

    Default Thanks!

    Thanks!


    That works! I guess it must be a variable scope issue.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar