7
votes
Accepted
Call to undefined method EE_Javascript::generate_json()
Go to line 706 in /system/expressionengine/third_party/campaigner/ext.campaigner.php and change it from:
$this->EE->javascript->generate_json($js_member_fields));
to:
json_encode($...
- 4,002
3
votes
Conditional logic inside of <script> tags
OK, I feel like an idiot! Forgot about the Javascript template type.
Solution: I simply created a new template, designated it as type "JavaScript", inserted my code, minus the <script> tags, ...
- 306
3
votes
Accepted
Ajax Pagination
Honestly, I wouldn't even mess with that plugin since that's what it's supposed to do. Just do a simple ajax call and append the data like this. Note the move of #articles to the main template, and ...
- 688
2
votes
Accepted
Channel Form javascript error when using Bootstrap
This usually happens with duplicate jquery files. You can add either of these parameters include_jquery="no" include_assets="no"
- 688
1
vote
Infinite scroll within conditional
Don't use the curly brackets and quotes on the segment in your conditional. Write your conditional like this:
{if segment_2 == ""}
Edit:
your closing div for entry-container is missing the last ...
- 501
1
vote
Accepted
Disable New Relic Script for one template
Have you tried the New Relic PHP api??
https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-api
Specifically
newrelic_disable_autorum ( )
Perhaps if you turned PHP (output) on ...
- 5,900
1
vote
Disable New Relic Script for one template
There's no way of doing this currently, but I can add it to our list of things to think about. Maybe a hidden config where you can add template group and template pairs:
$config['...
- 520
1
vote
On Form submit save values to cookie to repopulate form again - FreeForm
You'll have to write an extension which uses the freeform_module_insert_end hook to save the cookie (or cookies, depending - cookie size is an issue, so maybe one cookie per field?).
Something like:
...
- 17.4k
1
vote
Delete Assets input fields in a front-end form
Should use 'change' event instead of click. Cause user may not select any new file, then it will remove the existing file.
<img src="{url}" />
<input type="hidden" name="member_photo" value="...
- 11
1
vote
Delete Assets input fields in a front-end form
Darren used a button, which should work too, but here's the jQuery I came up with to remove the name attribute value:
HTML:
<label class="control-label" for="member_photo">Performer / Band ...
- 626
1
vote
Accepted
Delete Assets input fields in a front-end form
I think you need to output a delete button/checkbox alongside each image/input. You can then use jQuery to remove that img/input from the DOM so when you submit the form it's no longer there.
Maybe ...
- 203
1
vote
Freeform Pro Form with Submission Progress
I was able to fix this by adding the redirect url directly in the javascript:
success: function() {
window.location.href = "redirected-page.html";
}
- 11
1
vote
Insert Code into Middle of Channel Entry Post
Another option would to go with a Blocks or Content Elements approach, where your content is actually a list of content building blocks. Then you can have any combination: text-ad-text, text-ad-ad-...
- 418
1
vote
Accepted
How can I get EE to showing new programatically created entries immediately away after creation?
So it is a partial answer - it seems that the issue is managing the time it takes for EE to respond to the AJAX request. So for now I've fixed this by making the AJAX request synchronous... vis
...
- 3,587
1
vote
Accepted
Fresh EE 5.5.2 Install, Javascript Error That Breaks The Admin Control Panel: Please Help!
Your best bet is to open a support ticket with HostGator and asking them to 'whitelist' those mod_sec rules that are causing the problem. As EE5 isn't as common as say WordPress, most hosting ...
- 401
1
vote
Fresh EE 5.5.2 Install, Javascript Error That Breaks The Admin Control Panel: Please Help!
It seems to be an Apache server module.
The 406 status code is when a mod_security rule is enabled on an Apache server.
So, disable it could resolve this problem.
- 885
1
vote
Accepted
Error in Control Panel Channel Entries Pages: "EE.grid is not a function"
So you see the JS resource URL that is being loaded? It looks something like this:
.../admin.php?S=0&D=cp&C=javascript...
Open that link in a new tab. It is a compiled output of JS resources ...
- 5,900
1
vote
Accepted
Javascript for scrolling calendar
You need to make some changes to the jQuery. See below:
$(document).ready(function() {
$(document).on('click','.nav-calendar a',function(e){
e.preventDefault();
var $this = $(this)...
- 626
1
vote
How do I install a custom javascript on all pages before the </body> tag?
I believe each EE site uses any template that shares same data. Like., Head, Header, Footer etc. You can select any of those templates and put your JS code inside it.
To find out, You can edit any ...
- 2,177
1
vote
Where can I find the HTML, CSS, and JavaScript files in my dashboard?
The HTML should be under "Templates/Template Manager" in a tab called "Design" which is normally next to "Content". If you can't see that tab then yes, it most likely is your account doesn't have the ...
- 111
1
vote
load entries by batches
You can use here LAZY LOAD or INFINITE SCROLL (Just like automatic pagination)
https://www.sitepoint.com/jquery-infinite-scrolling-demos/
- 2,177
1
vote
Accepted
Why learn Javascript?
Greg is right - javascript is primarily a front-end resource: you use it to program activity within the user's browser.
While you can construct EE Sites that don't use any javascript at all - if ...
- 3,587
1
vote
Multiple/dynamic flexsliders for photo gallery
Easy peasy. Just create your unique ID's as you suggested, but give each carousel a common class.
$('.carousel').each(function() {
// this will loop over each carousel
var this_carousel_id = ...
- 5,900
1
vote
Accepted
EE 3.0 $.ee_filebrowser.add_trigger console errors
Had time to circle back around to this and finish up my add-on. I don’t think the FilePicker service was documented when I started the question, but it certainly is now:
https://docs.expressionengine....
- 952
1
vote
loading country code selection javascript file once per site visit
Use this Session add-on.
Add to your head (on every page):
{if "{exp:session_variables:get name="js_deployed"}" != "yes"}
<script src="{cdn_url}{exp:setversion path='/js/geo.js'}"></...
- 5,353
1
vote
Accepted
Prevent encoding of ampersand in a single entry?
In what context is this an issue?
js.src = "{your_tag}".replace("&", "&");
(whoa, they updated the guide theme)
https://ellislab.com/expressionengine/user-guide/development/...
- 5,900
1
vote
How to use angular js inside expression engine
I'm just now learning angular and plan to us it inside EE. I've tested it out on my local machine running ee3.05 and I didn't have any problems.
Here's the simple test page I used that worked:
<...
- 166
1
vote
Help with EE Ajax form
read much more in details in this site here - http://watabelabs.com/blog/view/submitting-expressionengines-contact-form-with-ajax
1
vote
Help with EE Ajax form
Looks like you can add a name=required[] parameter to each form field you want to make required:
https://ellislab.com/expressionengine/user-guide/add-ons/email/contact_form.html#required
- 133
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
javascript × 137jquery × 28
control-panel × 24
ee2 × 12
ajax × 12
css × 11
safecracker × 9
forms × 8
expresso-store × 7
templates × 7
solspace-freeform × 6
html × 6
snippets × 6
wygwam × 5
php × 5
variable × 5
channel-entries × 4
assets × 4
add-on × 4
pixelandtonic × 4
file-uploads × 4
error × 4
custom-fields × 4
fieldtype × 4
matrix × 3