I have a cloud page A that has Javascript and another cloud page B which has HTML, AMPscript and the cloud page A is called in cloud page B as src (<script src ="%%=Cloud Page B's URL=%%"></script>).

featureData has value of the id selected.

var abc= (featureData.id);

To do look up in the main html form, I need this value to prepopulate the input selected values from DE.

We cannot use SSJS in Javascript or JQuery. Cannot pass values from Javascript to Ampscript. Is there any method or a way to achieve this.

Thank you!

  • Hi, can you provide an example with more details, also the process workflow you want to build will be interesting to perhaps can you some tips. – Daniel Koch Jun 25 at 6:20
  • When a CloudPage is rendered, Ampscript is executed server-side before the page is finished loading and standard Javascript comes into play in the browser of the person vising the page. This means you can do a lookup in Ampscript and prepopulate a form without needing to use page B as a source. If you want the lookup to depend on what the person inputs on page A, then it gets more complex. – Rafał Wolsztyniak Jun 25 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.