SOLVED

Re: Simple Marketo form on external website not working

Go to solution
sg
Level 2
Level 2

Simple Marketo form on external website not working

Can someone help to correct this script which is not loading the Page at all

<html>
<head>
      <title>Embed Marketo Form</title>
</head>
<body>
    <h1>Test to load Marketo Form - not working</h1>
<script src="//pages.sjsu.edu/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_2031"></form> <script>MktoForms2.loadForm("//pages.sjsu.edu", "663-UKQ-998", 2031, function (form){MktoForms2.lightbox(form).show();});</script>
</body>
</html>

 

It does not show the Marketo Form when I browse to this page on Chrome.

What is wrong here? 

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Simple Marketo form on external website not working

Of course! Browsers place restrictions on localhost that prevent it from perfoming key actions.

 

You always want to develop with real local HTTP server of some kind. Simple Web Server is great for this.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Simple Marketo form on external website not working

Well, that embed code works fine on a test page. What’s the URL of your page?

sg
Level 2
Level 2

Re: Simple Marketo form on external website not working

I have that script on a page and tried to view the page using Chrome.

-It is not hosted on any Webserver
-Just browsing to the page did not work..


I think it has to be hosted by a Web Server, Just browsing to that page did not work

sg_1-1738184971846.png

 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Simple Marketo form on external website not working

Of course! Browsers place restrictions on localhost that prevent it from perfoming key actions.

 

You always want to develop with real local HTTP server of some kind. Simple Web Server is great for this.