mirror of https://github.com/docker/docs.git
				
				
				
			
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
| <!DOCTYPE html>
 | |
| <!-- saved from url=(0051)https://app-sj05.marketo.com/index.php/form/XDFrame -->
 | |
| <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 | |
|     <title>Marketo Forms 2 Cross Domain request proxy frame</title>
 | |
|     <script src="forms2.min.js"></script>
 | |
|     <script>
 | |
|       (function (){
 | |
|         var $ = MktoForms2.$;
 | |
|         if(!window.parent || window.parent == window){
 | |
|           return;
 | |
|         }
 | |
|         $(window).on("message", function (e){
 | |
|           var origin = e.originalEvent.origin;
 | |
|           var message = e.originalEvent.data;
 | |
|           try{
 | |
|             message = $.parseJSON(message);  
 | |
|           }catch(ex){
 | |
|             return;  //our messages are always JSON
 | |
|           }
 | |
|           if(message && message.mktoRequest && message.mktoRequest.ajaxParams){
 | |
|             var params = message.mktoRequest.ajaxParams;
 | |
|             params.success = function (data){
 | |
|               window.parent.postMessage(JSON.stringify({
 | |
|                 mktoResponse:{
 | |
|                   "for":message.mktoRequest.id,
 | |
|                   error:false,
 | |
|                   data:data
 | |
|                 }
 | |
|               }), origin);
 | |
|             }
 | |
|             params.error = function (error, code, errMessage){
 | |
|               window.parent.postMessage(JSON.stringify({
 | |
|                 mktoResponse:{
 | |
|                   "for":message.mktoRequest.id,
 | |
|                   error:true,
 | |
|                   data:errMessage                
 | |
|                 }
 | |
|               }), origin)
 | |
|             }
 | |
|             $.ajax(params);
 | |
|           }
 | |
|         });
 | |
|         window.parent.postMessage(JSON.stringify({mktoReady:true}), "*");
 | |
|       })()
 | |
|     </script>
 | |
|   </head>
 | |
|   <body>
 | |
|     <h2>This page is used by Marketo Forms 2 to proxy cross domain AJAX requests.</h2>
 | |
|   
 | |
| </body></html> |