jQuery突然:未捕获类型错误:非法调用
jQuery out of the blue: Uncaught TypeError: Illegal invocation
以下代码正在工作,但由于某种原因,第二天它一直在抛出:未捕获类型错误:非法调用
我似乎不知道它会在哪里破产。
function createFile() {
var selected_retailer_uuid = $("#search_store_select").select2("val");
var selected_video_uuid = $("#active_media_videos").select2("val");
var StartDate = $("#add_new_row_start_date").val();
var EndDate = $("#add_new_row_end_date").val();
var number_of_screens = $("#num_of_screens").select2("val");
var priority_upload_selected = $('#add_new_row_priority_upload').select2("val");
var get_start_times = getFirstPlayedBox();
var get_end_times = getSecondPlayedBox();
var selected_weekday_val = $("#weekdays_selected_input").select2("val");
$.ajax({
type: 'POST',
url: './inc/uploadManagerScript.php?argument=createVideoFile',
data: {
store_uuid: selected_retailer_uuid,
media_uuid: selected_video_uuid,
start_date: StartDate,
end_date: EndDate,
number_of_screens: number_of_screens,
video_priority_upload: priority_upload_selected,
start_time: get_start_times,
end_time: get_end_times,
weekday: selected_weekday_val
},
dataType: 'json'
})
.done(function(data) {
if(data){
$(".upload_manager_confirm_save .upload_manager_confirm_text").html("File copied to process folder");
$(".upload_manager_confirm_save").fadeIn(300).delay(1000).fadeOut(500);
}
});
}
此代码获取get_start_times,这与get_start_times相同。
var start_time = [];
function getFirstPlayedBox(){
var start_time = [];
$.each($('[class^=created_firstBox]'), function (i, item){
start_time.push($(this).val());
});
for(i=0;i<start_time.length;i++){
start_time[i];
}
return start_time;
}
html:
<div class="start_date_frmSplitLeft"><div class="err"></div><label for="start_date" class="add_new_row_text_color">Start Date: </label><input type="text" class="edit_add_new_row_upload_Box" id="add_new_row_start_date" name="add_new_row_start_date" required readonly /></div>
<div class="end_date_frmSplitRight"><div class="err"></div><label for="end_date" class="add_new_row_text_color">End Date: </label><input type="text" class="edit_add_new_row_upload_Box" id="add_new_row_end_date" name="add_new_row_end_date" required readonly /></div>
</span>
</fieldset>
<div id="times_wrapper">
<fieldset>
<span>
<div class="times_played_start"><label class="add_new_row_text_color">Times Played: </label></div>
</span>
</fieldset>
<fieldset>
<span>
<label id="lbl_add_new_row" ><i class="icon-plus" >Add New Row</i></label>
</span>
</fieldset>
</div>
<fieldset>
<span>
<!--<form method="get">-->
<div class="err"></div>
<label for="weekdays_selected_input" class="label_colour">Days Played: </label>
<select multiple id="weekdays_selected_input" name="weekdays_selected_input" required >
<option id="mon" value="mon">Monday</option>
<option id="tue" value="tue">Tuesday</option>
<option id="wed" value="wed">Wednesday</option>
<option id="thu" value="thu">Thursday</option>
<option id="fri" value="fri">Friday</option>
<option id="sat" value="sat">Saturday</option>
<option id="sun" value="sun">Sunday</option>
</select>
<!--</form>-->
</span>
</fieldset>
<fieldset>
<span>
<div class="err"></div>
<label for="add_new_row_priority_upload" class="label_colour">Priority Upload: </label>
<select id="add_new_row_priority_upload" name="add_new_row_priority_upload" class="leftStyle comboboxStyle" required >
<option></option>
<option>Yes</option>
<option>No</option>
</select>
</span>
</fieldset>
<fieldset>
<span>
<div class="err"></div>
<label class="label_colour">Videos: </label>
<select id="active_media_videos" name="active_media_videos" class="leftStyle comboboxStyle" required>
</select>
</span>
</fieldset>
<fieldset>
<span>
<div class="err"></div>
<label class="label_colour">Select Retailer: </label>
<select id="search_store_select" name="search_store_select" class="leftStyle comboboxStyle" required >
</select>
</span>
</fieldset>
<fieldset>
<select id="country_sel" placeholder="Select a country"></select>
<select id="province_sel" placeholder="Select a province"></select>
</fieldset>
<fieldset>
<label class="label_colour">Selection</label>
<ul id="store_selection" title="Double click to add to schedule"></ul>
</fieldset>
<fieldset id="storeSelectedWrapper">
<label class="label_colour">Selected</label>
<ul id="store_selected" title="Double click to remove from schedule"></ul>
</fieldset>
我正在为一个小团队工作。我不知道是谁改变了什么,但它坏了。有什么想法吗?
$.ajax({
type: 'POST',
url: './inc/uploadManagerScript.php?argument=createVideoFile',
data: {
store_uuid: selected_retailer_uuid,
media_uuid: selected_video_uuid,
start_date: StartDate,
end_date: EndDate,
number_of_screens: number_of_screens,
video_priority_upload: priority_upload_selected,
start_time: get_start_times,
end_time: get_end_times,
weekday: selected_weekday_val
},
number_of_screens应该被删除,因为它没有输入。
相关文章:
- 如何解决这种情况下的非法调用类型错误
- 未捕获的语法错误:意外的令牌非法?看起来不错
- 未捕获的类型错误:非法调用:模态形式的错误
- 非法调用错误 jquery
- Ajax 帖子未捕获语法错误:意外令牌非法
- 为什么这会引发未捕获的类型错误:非法调用
- 未捕获的语法错误:非法返回语句
- 尝试将javascript转换为jquery时出现错误“非法调用”
- 为什么我收到错误“语法错误:非法字符”
- jQuery突然:未捕获类型错误:非法调用
- Chrome 中的“未捕获的类型错误:非法调用”
- 未捕获的类型错误:非法的构造函数jquery-1.10.0.js
- 类型错误:非法调用console.log.apply
- 将email id作为参数发送给javascript函数:语法错误非法字符
- 未捕获的类型错误:非法调用addEventListener
- JavaScript未捕获类型错误非法调用
- 未捕获的类型错误:非法调用
- 读取CSV错误:非法数据.什么'正在发生
- 是什么导致了“未捕获的类型错误:非法调用”?在这段代码中
- 什么是Chrome中的“未捕获的类型错误:非法调用”