Skip to main content
Level 2
1月 29, 2025 7:29 下午 UTC
已解決

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? 

SanfordWhiteman
User Group Leader
1月 29, 2025 9:17 下午 UTC

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.

3 則回覆

SanfordWhiteman
User Group Leader
User Group Leader
1月 29, 2025 8:54 下午 UTC

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

翻譯
sg-3作者
Level 2
1月 29, 2025 9:09 下午 UTC

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

 

 

翻譯
SanfordWhiteman
User Group Leader
User Group Leader
1月 29, 2025 9:17 下午 UTC

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.

翻譯