Need to reference or use path location of a .js file, uploaded to Target Content library

Avatar

Avatar
Level 1
tehminac2778883
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
tehminac2778883
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
tehminac2778883
Level 1

24-01-2017

Hi Target Users

We are redesigining the existing form page. The new form will be in a modal instead of a page. However the form fields and functionality of the form need to remian the same. So some form fields have validations; for which we .js functions. 

We have a packaged code provided, that has front end code, back end code, css, html and .js files for the Test variation. 

Now we have uploaded those .js files to the asset library and are appearing in Target content/offer library. 

How do we refer the path of these .js files in the custom code section of the experience or how can we leverage these .js files in the html code of the form; which is added to the custom code section of the experience?

Thanks

Tehmina

Replies

Avatar

Avatar
Give Back 5
Employee
dwright
Employee

Likes

21 likes

Total Posts

80 posts

Correct reply

20 solutions
Top badges earned
Give Back 5
Seeker
Validate 1
Shape 1
Ignite 5
View profile

Avatar
Give Back 5
Employee
dwright
Employee

Likes

21 likes

Total Posts

80 posts

Correct reply

20 solutions
Top badges earned
Give Back 5
Seeker
Validate 1
Shape 1
Ignite 5
View profile
dwright
Employee

25-01-2017

Hi Tehmina,

Code assets in the offer library can only be used with the Form composer.  They cannot be accessed via the Visual Experience Composer (VEC).  If you want to use this code in the VEC you should paste your code into the custom code section of the experience. 

If you have thoughts on how we should incorporate the offer library into the VEC in a future release, please submit them via a client care ticket.

**updating my response**

You can use the offer library with the Visual Experience Composer using the Swap Offer functionality.  Swap Offer is really intended for you to replace content on the page, not to load additional js libraries, though.  If you wanted to attempt this, you need to make sure your library is wrapped in a <script></script> tag, as offers are expected to be HTML code.  Again, this is a non-standard use case and probably beyond what we can answer through the forums.

Daniel

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

30-01-2017

Hi Tehmina,

I hope the above answer helps to answer your query ?.  If yes, Can you please mark the query as resolved.

Thanks & Regards

Parit Mittal

Avatar

Avatar
Level 1
tehminac2778883
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
tehminac2778883
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
tehminac2778883
Level 1

30-01-2017

Hi Daniel 

Thanks for replying. I want to understand this in more detail. 

images, js files, json files, etc can be uploaded to the Target Offer lib. 

These files cannot be refrenced from outside of Target; which is fine. 

However, pls help me understand the nuances in refrencing these from the offer code in Target itself; to call an additional function; essentially not swapping action in the offer. 

Thanks 

Tehmina