الاثنين، 20 أبريل 2015

Re : Is there a jQuery way to pass a variable from one function to another function?

By Unknown   Posted at  10:36 ص   jQuery Forum No comments

I probably should not have included the URL to the test page. There are a couple of us hacking through it. Sorry for the confusion. 


Basically, we're trying to take the variable created by the following script...

  1. function cStatus(elem) {
        var els = [];
        while (elem) {
            els.unshift(elem);
            elem = elem.parentNode;
            if (elem.id == "new") {
                break;
            } else if (elem.id == "current") {
                break;
            }
        }
        custType = elem.id;
    }
    
and add it to the URL string created by this script...

  1. function tracker(assetName,assetType) {
      var fileref=document.createElement('script');
      fileref.setAttribute("type","text/javascript");
      fileref.setAttribute("src", "http://ift.tt/1GaFAc4; + assetName + "&assetType=" + assetType + "&custType=" + custType);
      if (typeof fileref!="undefined") {        
        document.getElementsByTagName("head")[0].appendChild(fileref);
      }
    






via jQuery Forum http://ift.tt/1blx4gc

About the Author

Nulla sagittis convallis arcu. Sed sed nunc. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.
View all posts by: BT9

0 التعليقات:

Back to top ↑
Connect with Us

© 2013 jQuery Forum. WP Mythemeshop Converted by Bloggertheme9
Blogger templates. Proudly Powered by Blogger.