Javascript not working for Recaptcha and URL Parameter Grab - Marketo Landing Page | Community
Skip to main content
New Participant
December 17, 2020
Solved

Javascript not working for Recaptcha and URL Parameter Grab - Marketo Landing Page

  • December 17, 2020
  • 1 reply
  • 1550 views

Hi there,

 

We are having issues with our new landing page we created in Marketo. Oddly we used the same Javascript in the past on other pages and it worked. But for some reason this time it is not. Code line 142 to 214 is where we put all the form embed and javascript.

 

(Original page removed) Solution = Missing jQuery library that was not attached.

 

Anyone ever this type of issue?

 

Regards

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Your code is attempting to use jQuery, which it expects to be assigned to the global variable $. But the standalone jQ library isn't in the page. You can use the bundled MktoForms2.$ instead.

 

I'd also note your selectors are wrong, they should be selecting only elements that are children of the form, not anywhere on the page.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
December 17, 2020

Your code is attempting to use jQuery, which it expects to be assigned to the global variable $. But the standalone jQ library isn't in the page. You can use the bundled MktoForms2.$ instead.

 

I'd also note your selectors are wrong, they should be selecting only elements that are children of the form, not anywhere on the page.

New Participant
December 17, 2020

Thanks for the headsup. We copied the code from another page so we must have missed a portion when creating the new page.