DP_jQuery_ * not defined when used with google chrome extension at content level

I am developing a Google Chrome extension. I am trying to use jquery-ui datepicker in the jquery-ui dialog of an existing web page (content level)

Also: Screenshot

I get "DP_jQuery_1274168529407 not defined" when I press any button on the datepicker widget, and I think this is because the jquery datepicker adds to the html:

onclick="DP_jQuery_1274192751418.datepicker._selectDay('#new\\-app\\-date',4,2010, this);return false;"

This means that I will have to change the datepicker library to avoid changing the html, but rather attach an event to each object as follows:

.click(function(){DP_jQuery_1274192751418.datepicker._selectDay('#new\\-app\\-date',4,2010, this);return false;})

This will probably keep the security area

What do you think?

+3
1

haxorz !

jquery-ui.js _updateDatepicker 8307 :

.find('[onclick]').each(function(){
    var command = $(this).attr('onclick')+'';
    $(this).removeAttr('onclick');
    command = command.replace("function onclick(event) {","");
    command = command.substr(0, command.length-2);
    $(this).click(function(){eval(command);});
})
.end()

.

, , jquery ui

+3

Source: https://habr.com/ru/post/1745935/


All Articles