SOLVED

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

Go to solution
GooseDigital
Level 1

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

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

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.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

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

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.

GooseDigital
Level 1

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

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