Questions tagged [javascript]

The tag has no usage guidance.

12 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
732 views

Content-Security-Policy Header vs. CSRF Token and login.html

My company would use the current version of the Content-Security-Policy header. We have problems with inline JavaScript and would not use MD5 checksums with the policy. Eg: CSRF Token support ...
2
votes
0answers
156 views

Live Preview not showing correct content when using single page app with JavaScript

So I am creating a website using Craft with JavaScript for making it a single page app. I load my layout which then calls the pages which works well. The only problem is that when viewing pages ...
2
votes
0answers
44 views

JavaScript equivalent to “namespaceInputName”?

Is there a JavaScript equivalent to namespaceInputName? My fieldtype settings are doing some interesting JavaScript gymnastics. Part of the process involves creating an array on the fly (so when the ...
1
vote
0answers
32 views

Can scripts loaded as ES Modules work with Live Preview?

How can a script loaded as an ES module be reinitiated after changes are made in Live Preview? In my experience a script loaded as a module is executed the first time Live Preview is opened, but then ...
1
vote
0answers
178 views

How can I edit multiple entries via multiple front-end forms using Vue.js?

I found this post. However, writing a plugin in currently not an option, and I'd like to do this with Vue.js since I'm already using it for form validation & other stuff. Also, this involves ...
1
vote
0answers
582 views

How to access logged in CSRF token?

I’m currently using react as a font end SPA with craft cms as the backend. I’m trying to create user accounts where a user use can sign up and favourite content on the site, using the Like for craft ...
1
vote
0answers
130 views

Need help with filtering entries by a custom field using ajax with pagination

I'm fairly new to CraftCMS and am stuck with a little filtering issue. I'm trying to filter a page of entries by a custom field. I'd like to use Ajax so there is no page reload. Here's how I have the ...
1
vote
0answers
485 views

Craft Nginx Cache Static Resources - Css, JS Errors

I'm currently trying to cache css and js files with the widely known config as follows: location ~* \.(png|jpg|css|js|jpeg|gif|ico|xls|doc|zip|exe|mp3|mp4|pdf|ai|psd|eps|ppt|dmg|csv|key|numbers|cur|...
1
vote
0answers
430 views

CSRF token creation and Content-Security-Policy header

I've just updated my site with setting my Content-Security-Policy Header and after fixing the slew of errors which popped up in the console, I am now down to one. The relevant part of my .htaccess ...
0
votes
0answers
22 views

How can I get uploaded images from my controller and upload them to Craft?

I'm using dropzone to upload images on my front-end. The form action url is to my controller from a custom plugin and that works fine. However, now I'm trying to get the files from dropzone (a json ...
0
votes
0answers
17 views

Undefined this.$overflowTabBtn.data(…) initTabs Craft.js:11326:51

I'm getting this error on one Solspace calendar (2.x) event entry form, but not another. The only difference seems to be two asset fields, and one entry reference field. It's the only page the error ...
0
votes
0answers
12 views

trigger javascript when block is added to matrix or supertable

I need to run javascript to modify a field-input when the user edits an entry and adds a block/row to a matrix or super-table field. Is there an event to listen on or some callback to hook in? ...