jquery - Javascript Uncaught TypeError - can't find line in error -
i inherited project. added last 12 lines of code. error doesn't have added stops dev tools stopping on break point. alert in code works , gives me correct data. but, i'm not getting "checked" status on checkbox think i'm pointing at. hard debug. i'm getting "uncaught typeerror: undefined not function". appears right below script> line. doesn't appear code, can't find problem. how can debug problem?
<script type="text/javascript"> colortab = function(tabname, color){ var tabs = coldfusion.layout.gettablayout('maintab'); var tab = tabs.gettab(tabname); tab.el.dom.firstchild.firstchild.firstchild.style.color = color; } init = function(){ colortab('tab10', 'red'); } </script> <script type="text/javascript"> error shows in dev tools uncaught typeerror: undefined not function $(document).ready(function() { //getcitystate = function(z){ //alert(z.value); //$.ajax({ //type: 'post', //url: 'http://www.zip-info.com/cgi-local/zipsrch.exe', //data: 'zip=' + z.value + '&go=go', //success: function (response, textstatus, jqxhr) { //alert('response ' + response); //}, //error: function(xhr, textstatus, errorthrown) { // show error //alert('error ' + errorthrown); //} //}); //} $('#adminperson').click(function(){ coldfusion.window.show('adminpersonwindow'); }); }); function submitadminpersons() { console.log("adminform " , $("#adminpersonform").serialize()); var adminstr = $("#adminpersonform").serialize(); $.ajax({ type: 'post', url: 'cfc/updates.cfc?method=updateadminperson', data: adminstr, success: function (response, textstatus, jqxhr) { //alert('response ' + response); }, error: function(xhr, textstatus, errorthrown) { // show error alert('error ' + errorthrown); } }); coldfusion.window.hide('adminpersonwindow'); alert('you have refresh page see new info.'); } jquery(document).ready(function() { jquery(".collapsecontent").hide(); //toggle componenet class msg_body jquery(".collapseheader").click(function() { jquery(this).next(".collapsecontent").slidetoggle(500); }); $('#jd_year').change(function() { var jdyear = $('#jd_year').val(); //alert(jdyear); if (jdyear){ $( "#skill_2" ).each(function( ) { if ( this.val() == "jd" ) { this.checked; return false; } }); } }); }); </script>
i think line "// show error" not commented in actual code.
please check in following code
$(document).ready(function() {
//getcitystate = function(z){ //alert(z.value); //$.ajax({ //type: 'post', //url: 'http://www.zip-info.com/cgi-local/zipsrch.exe', //data: 'zip=' + z.value + '&go=go', //success: function (response, textstatus, jqxhr) { //alert('response ' + response); //}, //error: function(xhr, textstatus, errorthrown) { **// show error** //alert('error ' + errorthrown); //} //}); //}
Comments
Post a Comment