Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 14291

execute js function on clicking tab?

$
0
0

i have a js function that works fine when attached to the onClick event of a button, but i want it to execute when user clicks the tab

 

is there a way to do that?

 

function clearURL() {

var testURL = document.URL;

var urlQry = testURL.split("?")[1];

if (urlQry != "")

    {

    var activeTab = ColdFusion.Layout.getTabLayout('myLayout').getActiveTab().title;

    if (activeTab == 'myTabTitle')

        {

        var newURL = testURL.split("?")[0];

        window.location = newURL;

        }

    }

}

 

thanks


Viewing all articles
Browse latest Browse all 14291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>