Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [javascript]

For questions related to JavaScript in Sitecore, including JS for Sitecore SPEAK applications (typically ReactJS), bugs or other issues with JS in Sitecore, hosting site JS in Sitecore, and beyond

0
votes
1answer
38 views

How to show a loading image mean while a submit form is being executed in Sitecore 9 Forms

Currently I have a form (created using Sitecore 9 Forms not with WFFM module) and on submit (custom submit action button). While clicking submit button, I have to show the loading image in the client ...
0
votes
1answer
39 views

WFFM custom toggle switch [closed]

I am adding toggle switch as a custom field. Toggle.cs (Toggle C# code) public class Toggle: Sitecore.Form.Web.UI.Controls.Checkbox { } public class ToggleField : Sitecore.Forms.Mvc....
0
votes
1answer
239 views

jQuery not working properly with Experience Editor

I'm struggling to get jQuery to work properly in Experience Editor. I found this question and tried all the answers on that page, but none of those work for me. So basically I have a clean page in ...
0
votes
0answers
48 views

Coveo search box is not working on pages which have WFFM form in it

In our site on the pages which have WFFM form in it, coveo search box is not working. I mean, on entering search keyword and clicking search, nothing is happening. Page is not redirecting to my ...
2
votes
1answer
167 views

How to extend SXA components scripts?

I need to overwrite/extend the component JavaScript (e.g.: script for the Carousel which is located here /sitecore/media library/Base Themes/Components Theme/Scripts/component-carousel) files to add ...
0
votes
0answers
70 views

JSS Angular - Placeholder not find in the layout definition

I am working on an app from already existing Sitecore application which is migrated as JSS application in the Disconnected mode, I have created my \data\routes\en.json but when I start the ...
1
vote
2answers
341 views

loading partial view from jquery

I am trying to swap partial views on my home page layout via jquery. I have 3 tabs which when clicked, would load their respective partial view into a placeholder on the main layout. In my ...
0
votes
0answers
146 views

Sitecore Inserting JavaScript with Content Editor

I'm trying to insert a little JavaScript code to an item. This is what I'm inserting: $.ajax( { url: "/api/Demo/EndVisit", method: "get", cache: ...
5
votes
1answer
166 views

How do I add some JavaScript at the bottom of every layout using a pipeline?

I'm wanting to add some JavaScript to the bottom of every page, but I don't want to add it to the layout(s), so I'd like a way of doing it with a pipeline (or similar). I've tried a few of the MVC ...
4
votes
2answers
221 views

Whats is the correct way to implement FXM generated script

I'm having a problem implementing FXM generated script on some of out sites. The Issue, I found is that, the generated Tracking script script is located on our CMS, which is not a public domain. I ...
2
votes
1answer
273 views

Sitecore Experience Editor not working with “.slick” command

I am using .slick command on the javascript for my page carousels. When I try to edit items in Sitecore Experience Editor(Sitecore 9 with SXA) my Save button is disabled and I am unable to add any new ...
1
vote
1answer
403 views

What is the best way to add a Javascript component to speak?

I want to use the jsgrid in a customized sitecore shell model , i wonder what could be the best way to include the script file without building a custom speak component. Thank you
1
vote
0answers
196 views

Configuration error in JSS Sitecore Quick start for development

Configuration error while browsing Sitecore basic jss app after performing deployment steps mentioned in below link: https://jss.sitecore.net/#/setup/app-deployment?id=app-deployment
4
votes
3answers
116 views

Why is my Ajax url found when I test in preview mode, but not when I bring up the page in a url I get not found errors

Update: this is what my url is trying to resolve to: /home/about us/api/sitecore/findanaffiliate/getaffiliate/ so here is my Ajax : <script type="text/javascript"> $("#AffiliateList")....
3
votes
1answer
43 views

Identify Administrators in Javascript

I am modifying the existing javascript for the SelectRoles modal window, and I would like to add a piece of code to check if the current user has the "Is Administrator" checkbox checked. I need to ...
8
votes
4answers
2k views

Why is my Ajax url not recognizing my sitecore controller or hitting my breakpoint in my sitecore controller?

this is my markup: the ajax is supposed to get called when there is a change to my dropdown selection: this is my ajax jquery: <script> $("#AffiliateList").change(function (e) { ...
0
votes
1answer
208 views

FXM XMLHttpRequest cannot load

When connecting a website via the Sitecore Federated Experience Manager I was prompted to add a script to the destination site: <script src="//linkedwebsite.com/bundle/beacon"></script> ...
1
vote
1answer
378 views

Caching issue for JS/CSS in Media Library node

We have one caching issues on live site. Actually we keep JS/CSS files in sitecore media library so after every prod deployment when we publish updates JS file we have to press Ctrl+F5 to load latest ...
1
vote
1answer
175 views

Angular JS directive with MVC integration Experience Editor errors

I am trying to use Angular Directive with MVC. Following Alex's blog post https://asmagin.com/2016/07/05/using-angularjs-directives-in-sitecore-edit-mode/ It is supposed to be working. But I am keep ...
3
votes
1answer
239 views

SXA: JS scripts optimization results in syntax error

It's now been a few times I am getting this error. Using Sitecore 8.2 rev. 160729 along with SXA 1.2 rev. 161216, when I modify a SXA javascript file (ie. a component-* file) inside the Media Library >...
2
votes
1answer
101 views

Undefined error when clicking Publish in Experience Editor

When we click the Publish button in the Experience Editor, we receive the following error in the ExperienceEditor.js: "Uncaught TypeError: Cannot read property 'get' of undefined The particular ...
4
votes
1answer
397 views

Sitecore jQuery version compatibility

We are using Sitecore 7.2 Update 4, jQuery 1.9.1 and Bootstrap 3.2.2 We are using TypeAhead which uses Bootstrap but it's not working in our solution as it's picking up jQuery version 1.5.1 included ...
2
votes
2answers
529 views

A serious error occurred please contact the administrator

I am working on SPEAK UI in Sitecore. I have created the button, Which is named as Edit Meta under content/webedit/ribbons/webedit in core database. This button will be shown in Experience Editor ...
7
votes
1answer
573 views

Sitecore component CSS and script handling in an HTTP/2 environment

First project using Helix coming up. In our previous project we've used HTTP/2 on the CDN, so we have adopted a lot of new best practices. One of the most important new best practices in HTTP/2 is ...
3
votes
1answer
172 views

Sitecore FXM with Coveo, dynamic html does not seem to render

Sitecore 8.1 (160302) I have a client using Sitecore FXM to export HTML/JS/CSS to an external site in order to preserve the same experience outside of Sitecore. The "experience" itself is mostly the ...
8
votes
3answers
3k views

How to Render Javascript per page or component?

So I have renderings that depend on specific CSS or specifically Javascript. Do you load the same Javascript on all pages even if the Javascript is for a specific page/rendering, or do you pull in ...
6
votes
1answer
441 views

Add custom redirect on SPEAK logout

We are using OIOSAML.NET/dk.Nita for NemLog-in (Danish National Identity Provider) as authentication mechanism for editors. Claims from the federation are mapped to Sitecore users on login, and that ...
6
votes
2answers
205 views

Is it possible to edit fields in the Page Editor that are shown on hover?

I have a menu where the submenu area is shown when you hover over the top menu option. The top option is a link field and the submenu is a rich text area. When I hover over the top option the submenu ...
10
votes
2answers
485 views

Example of populating list in experience profile page with JSON data

I am setting up a custom tab with custom facet data in the Experience Profile. I am successfully returning text values to the screen. Now, I want to populate data into a list control. Are there ...
3
votes
1answer
318 views

How do I construct a reasonable JS implementation of canExecute() for an Experience Editor Button?

I am trying to run a field editor for editing some meta data (tagging, description, title, image selection) in Experience editor. My starting point was https://blog.istern.dk/2015/03/02/running-...