Store value from webpage before redirecting to another | Adobe Higher Education
Skip to main content
Level 4
October 4, 2021
해결됨

Store value from webpage before redirecting to another

  • October 4, 2021
  • 1 답변
  • 1680 조회

Hi All,

Iam trying to create a webpage in adobe campaign classic which it has fisrtname,lastname and 2 buttons.

When the customer clicks on anyone of the buttons then they will be redirected to another page.

My issue is that I need to store in a schema a value or any identification system to know which customer clicked on which redirection button.

With the below flow I am able to store the firstname lastname to my schema but which button the customer chose  I am not able to get it. In page1 iam taking the firstname,lastname details then storing i schema after that the two buttons page(page2) will come. after that how i can store is my doubt.

 

Could someone please help me out in this?

 

Thanks & Regards,

Greeshma

 

이 주제는 답변이 닫혔습니다.
최고의 답변: Manoj_Kumar

Hello @greeshma_sampath1 ,

 

Create a ctx variable in web app and use the javascript to update the value.

 

HTML Code:

<button type="button" onclick="myFunction('button1')">Button 1</button>

<button type="button" onclick="myFunction('button2')">Button 2</button>

Now use this js code to save to ctx variable.

function myFunction(button){
document.controller.setValue('/ctx/vars/buttonClicked',button);
}

1 답변

Manoj_Kumar
Community Advisor
Community Advisor
October 4, 2021

Hello @greeshma_sampath1 ,

 

Create a ctx variable in web app and use the javascript to update the value.

 

HTML Code:

<button type="button" onclick="myFunction('button1')">Button 1</button>

<button type="button" onclick="myFunction('button2')">Button 2</button>

Now use this js code to save to ctx variable.

function myFunction(button){
document.controller.setValue('/ctx/vars/buttonClicked',button);
}
Manoj  | https://themartech.pro
Level 4
October 7, 2021

Thank you @_manoj_kumar_  it worked.