I have a js "my_js_file.js" file which I include only into a single page. In that js file I need to get an url by calling a phoenix helper:  # my_js_file.js  function func1(userLogin) {   var createUserUlr = "<%= user_home_path(@conn,...
I need to translate stuff on the client side of my Elixir Phoenix application. What is the best workflow for that? I've the default gettext system on the server side with it's translation files. How do I make a subset of the translations avai...
I'm trying to convert a Ruby on Rails + d3.js app to Elixir on Phoenix + d3.js.  I cannot seem to get d3.js to load properly.  I have it in web/static/vendor/js/d3.v3.min.js. And my brunch-config.js has an order before section like this:  order:...
As TypeScript is a superset of Javascript, enabling developers to define types, which can be checked during compile time.  Is there a typescript for Elixir, which too is a dynamic language?  A superset of Elixir which enables type checking during com...
I have been trying to encrypt in Javascript and decrypt in Elixir using AES 256 with GCM. I borrowed some examples from here and there and came up with the following.  Encryption in Javascript  const _crypto = require('crypto');  function enc...
Inside  tag in my index.html.eex i can use this syntax to retrive text.  <%= gettext "Login failed!"%>   Now i have a js file used for validating fields, and i load this file as a script inside index.html.eex.  Everything works fine but...
Inside a render function in my template I'm passing this parameter:  placeholderTitle: (gettext "Companie\'s name")   I need to escape the ' because that string is going to be used inside inline javascript:  onfocus="if (this....
I've set up a standard Phoenix websocket/channel environment but I am not using the socket.js provided - I have my own (very simple) code that connects to the channels and topics. However, I can't get the socket to persist beyond a minute or...
I'm trying to use materizecss javascript jquery features, but I'm getting below error message In the browser.  Error message: Uncaught TypeError: $(...).carousel is not a function  Any idea how to properly setup javascript? Where to put <!...
I am using Stripe.js to make payment in my phoenix application.   I want to use the tokenized payment method, for this I have to pass the card information in a form and make a call to Stripe.createToken(card) method.   Once, I receive the token I wan...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.