Questions tagged [javascript]

The tag has no usage guidance.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
632 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
148 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
31 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
129 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
491 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
118 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
483 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
366 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
7 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? ...
0
votes
0answers
16 views

Update the element selection in BaseElementSelectInput via Javascript

I am building a javascript helper to assist user to populate some Entry/Category data. For the BaseElementSelectInput widget used in Entry/Category field when editing an entry, is there any way to ...