Okay
  Public Ticket #1178035
Addon Javascript {{variable}}
Closed

Comments

  •  2
    Stephan started the conversation

    Hello,


    how can I use the {{variable}} within the addon Javascript?

    I created an image attribute "test_image". Nothing happens if I for example add the following code:

    alert({{test_image}}); 


    How can I use the variable and can I also override the src or the value of this attribute via javascript?


    Kind regards

  •  1,173
    Amit replied

    the code needs to be like this for the image to work

    <img src="{{test_image}}">

  •  2
    Stephan replied

    Well you are on the HTML-tab. That wasn't my question :-)
    I want to access this variable with javascript, because I want to handle some special cases.
    My question was, if there is an option to access it or to override it?
    In my thoughts I define a new image source for a special eventhandler and override it when the handler fires. The image (defined in html tab with <img src="{{test_image}}"> ) would use the new src that I defined in the addon javascript. I simply want to read the variable out.

  •   Max replied privately
  •   Stephan replied privately
  •   Max replied privately
  •   Stephan replied privately
  •   Max replied privately