Guest User

cfwindow

a guest
Apr 19th, 2011
307
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. index.cfm
  2. <cfajaximport tags="cfwindow">
  3.  
  4. <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
  5. <script>
  6. openPopup = function(){
  7.     ColdFusion.Window.create('popupWindow','Test window','window.cfm');        
  8.     ColdFusion.Window.onHide('popupWindow',cleanup);
  9. }
  10.    
  11. cleanup = function() {
  12.         ColdFusion.Window.destroy('popupWindow',true);
  13. }
  14. </script>
  15.  
  16. <a href="##" onclick="openPopup();">open cfwindow</a>
  17.  
  18. <a href="window.cfm">Open link normally</a>
  19.  
  20. ___________
  21. window.cfm
  22.  
  23. <!DOCTYPE html>
  24. <html>
  25.  
  26. <head>
  27. <style type="text/css">
  28.   #map_canvas { width: 450px; height: 450px; }
  29. </style>
  30. <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
  31. <script type="text/javascript">
  32. initialize = function() {
  33.     var latlng = new google.maps.LatLng(31, -92);
  34.     var myOptions = {
  35.         zoom: 8,
  36.         center: latlng,
  37.         mapTypeId: google.maps.MapTypeId.HYBRID,
  38.         panControl:false,
  39.         zoomControl:false,
  40.         streetViewControl:false,
  41.         mapTypeControl:false
  42.     };
  43.     var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
  44. }
  45. </script>
  46. </head>
  47.  
  48. <body onload="initialize()">
  49.  
  50.   <div id="map_canvas"></div>
  51.  
  52. </body>
  53. </html>
RAW Paste Data