jQuery bookmarklet not working
<p>Is there something in the code of a page that can prevent a javascript bookmarklet from interacting with the page?  I have written a jQuery bookmarklet to fill in a complex form, about 250 fields, and tested portions of the form in jsFiddle successfully.  Unfortunately, when I put it all together and attempted it on the actual form I get nothing.</p>

<p>I'm running this in Firefox with Firebug and not getting any kind of output to Firebug to point me in the right direction.  I can only guess that there might be something in the code of the actual page preventing an external javascript from interacting with that loaded page?  Does this sound possible?  Is there a way around it?  Is there a way to test for and confirm this?</p>

<p>Thanks in advance again for any help.</p>

<p>My guess is that what is interfering is located in this top section of javascript and various scripts that are being sourced by the actual page.</p>

<pre><code>&lt;head&gt;&lt;script type="text/javascript"&gt;/* &lt;![CDATA[ */_cf_loadingtexthtml="&lt;img alt=' ' src='/CFIDE/scripts/ajax/resources/cf/images/loading.gif'/&gt;";
_cf_contextpath="";
_cf_ajaxscriptsrc="/CFIDE/scripts/ajax";
_cf_jsonprefix='//';
_cf_websocket_port=8575;
_cf_flash_policy_port=1243;
_cf_clientid='D4C17F4DE745D7B2C3079E2B52AED452';/* ]]&gt; */&lt;/script&gt;&lt;script type="text/javascript" src="/CFIDE/scripts/ajax/messages/cfmessage.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="/CFIDE/scripts/ajax/package/cfajax.js"&gt;&lt;/script&gt;

    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"/&gt;
    &lt;meta http-equiv="expires" content="0" /&gt;
    &lt;meta http-equiv="cache-control" content="no-cache"/&gt;
    &lt;meta http-equiv="pragma" content="no-cache"/&gt;



        &lt;link rel="shortcut icon" href="/am/images/favicon.ico" /&gt;

            &lt;link href="/am/assets/css/app.min.css?ux-theme&amp;refresh=25%2DMar%2D16%2004%3A54%3A42" rel="stylesheet"/&gt;


        &lt;!-- --&gt;
            &lt;link rel="stylesheet" type="text/css" href="/am/css/grid.css?refresh=25%2DMar%2D16%2004%3A54%3A42" media="screen"&gt;
        &lt;!-- --&gt;
            &lt;link rel="stylesheet" type="text/css" href="/am/css/page.css?refresh=25%2DMar%2D16%2004%3A54%3A42" media="screen"&gt;
            &lt;link rel="stylesheet" type="text/css" href="/am/css/page.css?refresh=25%2DMar%2D16%2004%3A54%3A42" media="print"&gt;
            &lt;link rel="stylesheet" type="text/css" href="/am/css/print-page.css?refresh=25%2DMar%2D16%2004%3A54%3A42" media="print"&gt;
            &lt;link rel="stylesheet" type="text/css" href="/am/css/print-grid.css?refresh=25%2DMar%2D16%2004%3A54%3A42" media="print"&gt;

            &lt;link rel="stylesheet" type="text/css" href="/am/css/ux/css/validationEngine.jquery.css?refresh=25%2DMar%2D16%2004%3A54%3A42" media="screen"&gt;





        &lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript"&gt;window.jQuery || document.write('&lt;script src="/AM/assets/js/lib/jquery-1.7.1.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt;

        &lt;script type="text/javascript"&gt;
            ( function ($) {
                var ua = navigator.userAgent.toLowerCase();
                if ( ua.indexOf("compatible") &lt; 0 &amp;&amp; /(trident)(?:.*? rv ([\w.]+)|)/.exec( ua ) ){
                    $.browser['msie'] = true;
                    delete $.browser['mozilla'];
                }
            })(jQuery);
        &lt;/script&gt;




        &lt;script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"&gt;&lt;/script&gt;
        &lt;script&gt;window.jQuery.ui || document.write('&lt;script src="/AM/assets/js/lib/jquery-ui-1.8.21.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt;


        &lt;script language="JavaScript" src="/AM/assets/js/ux/ux.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script language="JavaScript" src="/AM/assets/js/ux/ux.ajax.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script language="JavaScript" src="/AM/assets/js/ux/ux.validationEngine.js?refresh=25%2DMar%2D16%2004%3A54%3A42" &gt;&lt;/script&gt;


        &lt;script src="/AM/assets/js/lib/angular/angular-1.1.5/angular.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/AM/assets/js/lib/angular-cookies/angular-cookies-1.0.6/angular-cookies.min.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/AM/assets/js/lib/moment-2.0.0.min.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/AM/assets/js/lib/angular-strap/angular-strap-0.7.5/dist/angular-strap.min.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;

        &lt;script src="/EHR/scripts/resources/cost-center/cost-center-resource.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/resources/rest-resource.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/resources/episode-frequency/episode-frequency.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/resources/icd/icd-resource.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/resources/list-frequency/list-frequency-resource.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/resources/list-interval/list-interval-resource.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;

        &lt;script src="/EHR/scripts/services/clinic/clinic-setting-service.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/services/user/clinic-user-service.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/services/user/user-service.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/services/util/form-util-service.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/services/util/util-service.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/services/ux/ux-service.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;

        &lt;script src="/EHR/scripts/directives/kinnser/blur/blur.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/directives/kinnser/focus/focus.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/directives/kinnser/icd-lookup/icd-lookup.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/directives/kinnser/infinate-scroll/infinate-scroll.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/directives/kinnser/oss-grid/oss-grid.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/directives/kinnser/oss-modal/oss-modal.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/directives/kinnser/oss-modal/oss-modal-service.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script src="/EHR/scripts/directives/kinnser/ux/date-picker.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;

        &lt;script src="/AM/scripts/amng-app/app.js"&gt;&lt;/script&gt;

        &lt;script language="javascript"&gt;

$(document).ready(function(){

var useTooltipContainer;
var $tooltipMaster;

if (useTooltipContainer == true) {
$tooltipMaster = $("#tooltipContainer .tooltipMaster");
}
else {
$tooltipMaster = $(".tooltipMaster");
}


$tooltipMaster.live("mouseover",function(e){
    $(this).easytooltip($(this).attr("id"),$(this).attr("id")+"_tooltip");
    e.stopPropagation();
})      

});


jQuery.fn.easytooltip=function(elemID,id,options){
var Config={event:'mousemove'};
if(options){
    jQuery.extend(Config,options);
};

if( !document.getElementById('tool_tip_action_' + id) ){
    $("body").append('&lt;div id="tool_tip_action_'+id+'"&gt;&amp;nbsp;&lt;/div&gt;');
    $("#tool_tip_action_"+id).css({
        "background-color":Config.backgroundcolor,
        border:Config.border,
        color:Config.color,
        position:"absolute",
        "z-index":"1001",
        "display":"none"
    });
}

function brwstester(){
    return(document.compatMode&amp;&amp;document.compatMode!="BackCompat")?document.documentElement:document.body;
}

$("#"+id).hide();
$(this).bind(Config.event,function(e){
    if( screen.width&lt;=( e.pageX+40+$("#tool_tip_action_"+id).width() ) ){
        var lfts=e.pageX-$("#tool_tip_action_"+id).width()-20;
    }
    else {
        var lfts=e.pageX+20;
    }

    if( brwstester().scrollTop&lt;e.pageY-20-$("#tool_tip_action_"+id).height()     ){
        var tps=(e.pageY-$("#tool_tip_action_"+id).height()-20);
    }
    else{
        var tps=e.pageY+20;
    }

    $("#tool_tip_action_"+id).html($("#"+id).html()).css({
        "left":lfts,
        "top":tps
    }).show();
});

$("#tool_tip_action_"+id).bind("touchstart",function(){
    $("#tool_tip_action_"+id).hide().css({
        "left":0,
        "top":0
    });
    return false;
});

$(this).bind("mouseout",function(){
    $("#tool_tip_action_"+id).hide().css({
        "left":0,
        "top":0
    });
});
}
&lt;/script&gt; 

        &lt;script type="text/javascript" src="/AM/assets/js/lib/jquery.tinysort-1.0.2.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="/AM/assets/js/lib/sortable.js"&gt;&lt;/script&gt;



        &lt;script type="text/javascript" src="/AM/assets/js/lib/paginator-1.0.Beta.js"&gt;&lt;/script&gt;

        &lt;script language="JavaScript" src="/am/menubar/menubarJS.js?refresh=25%2DMar%2D16%2004%3A54%3A42a" &gt;&lt;/script&gt;

        &lt;script type="text/javascript" src="/AM/assets/js/util.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;


        &lt;script type="text/javascript" src="/AM/assets/js/lib/jquery.validate-1.5.5.js"&gt;&lt;/script&gt;

        &lt;script type="text/javascript" src="/AM/assets/js/jquery.validationEngine.min.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="/AM/assets/js/jquery.validationEngine-en.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;

        &lt;script type="text/javascript" src="/AM/assets/js/lib/css-browser-selector-0.4.0.js"&gt;&lt;/script&gt;




        &lt;script language="javascript" type="text/javascript" src="/am/assets/js/KinnserDataTables/KinnserDataTables.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script language="javascript" type="text/javascript" src="/am/assets/js/lib/dataTables/plugins/jquery.dataTables.rowGrouping.js"&gt;&lt;/script&gt;
        &lt;script src="//ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"&gt;&lt;/script&gt;
        &lt;script&gt;window.jQuery.fn.DataTable || document.write('&lt;script src="/am/assets/js/lib/dataTables/dataTables-1.9.4/media/js/jquery.dataTables.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt;
        &lt;script language="javascript" type="text/javascript" src="/am/assets/js/KinnserDataTables/plugins/state.dataTables.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script language="javascript" type="text/javascript" src="/am/assets/js/lib/dataTables/plugins/jquery.dataTables.fnStandingRedraw.js"&gt;&lt;/script&gt;
        &lt;script language="javascript" type="text/javascript" src="/am/assets/js/KinnserDataTables/plugins/KinnserDataTables.sorting.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;
        &lt;script language="javascript" type="text/javascript" src="/am/assets/js/KinnserDataTables/plugins/KinnserDataTables.pagination.js?refresh=25%2DMar%2D16%2004%3A54%3A42"&gt;&lt;/script&gt;



        &lt;script&gt;
        $(document).ready(function(){





                $('.logout').click(function(){ ux.statePersistance.clear();})

            if ($('.ux-datatables').length &gt; 0){
                bootstrapDatatableScript = document.createElement('script');
                bootstrapDatatableScript.language = 'javascript';
                bootstrapDatatableScript.type = 'text/javascript';
                bootstrapDatatableScript.src = '/am/assets/js/KinnserDataTables/plugins/bootstrap.dataTables.js?refresh=25%2DMar%2D16%2004%3A54%3A42'
                document.getElementsByTagName('head')[0].appendChild(bootstrapDatatableScript);
            }
            else{
                var includeCSS = function(file) {
                    var css = document.createElement('link');
                    css.rel = 'stylesheet'
                    css.type = 'text/css';
                    css.href = file;
                    css.media = 'screen';
                    document.getElementsByTagName('head')[0].appendChild(css);
                }
                includeCSS('/am/assets/js/lib/dataTables/dataTables-1.9.2/media/css/demo_table.css');
                includeCSS('/am/assets/js/lib/dataTables/dataTables-1.9.2/media/css/demo_table_jui.css');
            }
        });
        &lt;/script&gt;


        &lt;script type="text/javascript" src="/AM/assets/js/lib/jquery.versioncompare.js"&gt;&lt;/script&gt;

        &lt;script language="javascript" type="text/javascript" src="/AM/assets/js/lib/jquery.cookie-1.2.js"&gt;&lt;/script&gt;


        &lt;script type="text/javascript"&gt;
        $(document).ready(function(){
            //Stripping json prefix and adding token to header
            $.ajaxSetup({
                headers: {'token': $.cookie('EHRTOKEN')},
                cache:false,
                dataFilter:function(data,type) {
                    //remove "//"
                    if( type == 'json' ) {
                    data = data.substring(2,data.length);//remove "//"
                    // remove '&lt;*&gt;' prefix from every field value (serializeJSON fix for CF)
                    data = data.replace(/":"&lt;\*&gt;/ig, '":"');
                    }
                    return data;
                }
            });
            // Set app base url for ux library
            ux.config.setAppBaseUrl('/am/');

            $('#globalAjaxLoader').ajaxStart(function(){$(this).show();})
            $('#globalAjaxLoader').ajaxStop(function(){$(this).hide();})

            //from util.js. overrides default behavior and makes radio buttons uncheckable
            setRadiosUncheckable();

            $('#gTemplateErrorWindow').dialog({ //generic error handling dialog construction
                bgiframe: true,
                height: 200,
                width: 350,
                modal: true,
                autoOpen:false,
                buttons: {
                    'Ok': {
                        id: 'gTemplateErrorOkButton',
                        text: 'Ok',
                        click: function() {
                            $(this).dialog('close');
                        }
                    } //end of Ok button declaration
                }
            });


        });
        &lt;/script&gt;

    &lt;!-- Placed at the end of the document so the pages load faster --&gt;
    &lt;script src="/AM/assets/js/lib/bootstrap/bootstrap-2.3.1.min.js"&gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/lib/bootstrap/extensions/bootstrap-popover.js"&gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/jquery.kinnser.utils.js"&gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/lib/jquery.maskedinput-1.3.min.js"&gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/lib/jquery-jsRender-1.0.pre.js"&gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/ux/ux.datepicker.js?refresh=25%2DMar%2D16%2004%3A54%3A42" &gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/ux/ux.wellaccordion.js?refresh=25%2DMar%2D16%2004%3A54%3A42" &gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/ux/ux.visitOverlapMessageFormat.js"&gt;&lt;/script&gt;
    &lt;script src="/AM/assets/js/ux/ux.searchDuplicatedPatient.js"&gt;&lt;/script&gt;


    &lt;script type="text/javascript" src="/AM/assets/js/lib/ios-orientationchange-fix.js"&gt;&lt;/script&gt;


    &lt;script src="/AM/assets/js/ux/ux.patientDetail.js?refresh=25%2DMar%2D16%2004%3A54%3A42" &gt;&lt;/script&gt;

    &lt;script src="/AM/assets/js/ux/ux.taskComment.js?refresh=25%2DMar%2D16%2004%3A54%3A42" &gt;&lt;/script&gt;


    &lt;script src="/AM/assets/js/ux/ux.statePersistance.js?refresh=25%2DMar%2D16%2004%3A54%3A42" &gt;&lt;/script&gt;



&lt;script type="text/javascript"&gt;/* &lt;![CDATA[ */
ColdFusion.Ajax.importTag('CFDIV');
/* ]]&gt; */&lt;/script&gt;
&lt;/head&gt;


    &lt;body class="ux" &gt;


&lt;div id="gTemplateErrorWindow" style="display: none;"&gt; 
    &lt;div id="gTemplateErrorWindowText"&gt;&lt;/div&gt;
&lt;/div&gt;



    &lt;div class="container" id="AMContainer"&gt;
        &lt;div&gt;
            &lt;div id="globalAjaxLoader" class="ajaxLoading"&gt;
                &lt;div style="margin: 0px auto 0px auto; color:white; font-weight:bold; width:95px; background-color:#A31F24"&gt;Loading...&lt;/div&gt;
            &lt;/div&gt;



                &lt;div class="header"&gt;
                    &lt;a href="/am/Message/inbox.cfm"&gt;
                    &lt;img src="/packages/images/header/kinnser-agancy-manager.png" alt="Kinnser Agency Manager" border="0"&gt;
                    &lt;/a&gt;



&lt;script type="text/javascript"&gt;
$('#swapUser').live('change', function (e) {
    var valueSelected = this.value;
    var userValues = valueSelected.split(',');
    var userkeySelected = userValues[0];
    var userTypeSelected = userValues[1];
    $.ajax({
        type:'POST',
        url:'/API/services/Authentication/AuthenticationService.cfc?method=switchContext',
        dataType: 'json',
        data: {
            userkey: userkeySelected,
            userType: userTypeSelected
        },
        success: function(data) {
            var redirectUrl = '/ContextSwitch.cfm?product=' + data.data.product + '&amp;userKey=' + data.data.UserKey;

            if(data.data.ClinicUserKey !== 0){
                redirectUrl += '&amp;clinicUserKey=' + data.data.ClinicUserKey;
            }

            window.location = redirectUrl;
        }       
    }); 
}); 
</code></pre>

<p></p>