Skip to main content
Topic: Admin search results javascript error (Read 1576 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Admin search results javascript error

Code: [Select]
function showhideJqueryOptions() {
var jqBase = document.getElementById('jquery_default').checked,
jqUi = document.getElementById('jqueryui_default').checked,
jqBase_val = $('#jquery_version'),

Code: [Select]
Unhandled Error: Cannot convert 'document.getElementById('jquery_default')' to object
Bugs creator.
Features destroyer.
Template killer.

Re: Admin search results javascript error

Reply #1

Now I got it: this is a more general issue, I think.
The "good practice" should be that we do not use addInlineJavascript in the method that defines the array (_basicSettings in that case), but in the "display" one (action_basicSettings_display).
That way, when the settings are required for the search, the javascript and bits are not added to the template.
Bugs creator.
Features destroyer.
Template killer.

Re: Admin search results javascript error

Reply #2

Oops ... that addInlineJavascript('showhideJqueryOptions();', true); should not be in action_basicSettings_display not in _basicSettings ... I'll add that to my PR



ETA: yeah what he said while I was typing that :P