Advertisement
Guest User

Untitled

a guest
Jan 12th, 2011
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. index.php:
  2.  
  3. <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
  4. <script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
  5.  
  6. <script type="text/javascript">
  7. function showRegDialog(url) {
  8. $(function() {
  9.  
  10.  
  11. var $this = $(this);
  12. var horizontalPadding = 30;
  13. var verticalPadding = 30;
  14. $('<iframe id="externalSite" scrolling="no" frameborder="0" class="externalSite" src="' + url + '" />').dialog({
  15. title: ($this.attr('title')) ? $this.attr('title') : 'Choose your location',
  16. autoOpen: true,
  17. width: 700,
  18. height: 700,
  19. modal: true,
  20. resizable: true,
  21. autoResize: true,
  22. overlay: {
  23. opacity: 0.5,
  24. background: "black"
  25. }
  26.  
  27. }).width(700 - horizontalPadding).height(700 - verticalPadding);
  28.  
  29. });
  30. }
  31. </script>
  32. <script type="text/javascript">
  33. function closeModal() {
  34. $("#externalSite").dialog("close");
  35. }
  36. </script>
  37.  
  38. iframe.php:
  39.  
  40. <html xmlns="http://www.w3.org/1999/xhtml">
  41. <head>
  42. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  43. <title>Untitled Document</title>
  44. <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
  45. <script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
  46. <script>
  47. $("#test2").submit(function(){
  48. parent.closeModal();
  49. });
  50. </script>
  51. </head>
  52.  
  53. <body>
  54.  
  55. <form id="test2" action="" method="post">
  56. <input type="submit" />
  57. </form>
  58.  
  59. </body>
  60. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement