Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Getting to a Web App next page using a script

Avatar

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

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

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
sagil23995776
Level 2

19-07-2017

Hi,

I have an Adobe Campaign Web app with 2 pages.

I'm trying to enable a transition between the first and the second page via a link and a script since I need to use variables in the second page.

This is the HTML that calls the function:

<a href="#" title="Edit" onClick="updateContent('inbox','<%= promotion.@workflow_internal_name %>')">Edit</a>

and this is the 'updateContent' function in the web app Header that triggers the transition to the next page:

  function updateContent(channelEdit, templateEdit) {

      document.controller.setValue('/ctx/vars/varChannelEdit', channelEdit);

      document.controller.setValue('/ctx/vars/varTemplateEdit', templateEdit);

      document.controller.submit('next','_self','next');

  }

When I'm doing preview on the web app everything works fine,

But after publishing the web app it only works through the web client.

If I'm in the rich client clicking on the link the first page is being reloaded again and I'm not being moved to the next page.

Does anyone knows what can cause this?

Thanks,

Sagi

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

183 posts

Correct Reply

41 solutions
Top badges earned
Coach
Contributor
Shape 1
Give Back 25
Give Back 10
View profile

Avatar
Coach
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

183 posts

Correct Reply

41 solutions
Top badges earned
Coach
Contributor
Shape 1
Give Back 25
Give Back 10
View profile
david_garcia1
MVP

26-07-2017

Add an onclick function to the link and in the function enable the transition ie.

p.s - submit would be the name of the transition you want to activate.

Answers (4)

Answers (4)

Avatar

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

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

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
sagil23995776
Level 2

27-07-2017

I Understand now after trying David solution that

apparently the onClick event doesn't work from an <a> tag but on  <img> or <p> etc it does work.

I've modified my code a little and it works now.

Thanks

Avatar

Avatar
Coach
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

183 posts

Correct Reply

41 solutions
Top badges earned
Coach
Contributor
Shape 1
Give Back 25
Give Back 10
View profile

Avatar
Coach
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

183 posts

Correct Reply

41 solutions
Top badges earned
Coach
Contributor
Shape 1
Give Back 25
Give Back 10
View profile
david_garcia1
MVP

27-07-2017

Good 1 that you've resolved the issue.

Avatar

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

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

Avatar
Validate 10
Level 2
sagil23995776
Level 2

Likes

17 likes

Total Posts

32 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
sagil23995776
Level 2

27-07-2017

Hi,
I mean that on the preview when editing the web application it works fine before and after publishing.
But after I publish if I'm testing it live by clicking on the link through the published page the transition works only on the web client and not on the rich client.

My code is same as suggested by david_garcia (just without the verification)

version 6.1.1 build 8687

server: version 6.1.1 build 8754

Thanks

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

236 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

236 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

26-07-2017

Hi Sagi,

Do you mean that the preview isn't working anymore from the rich client once the web app is published?

Did you test it live after the publication to see if you encounter a problem?

Can you share wich build you are using? (for both console and server).

Thanks you,

Florent