jQuery: abrir outra jsp depois que clicar OK em janela modal

0 respostas
Roger75
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!doctype html>
 
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>jQuery UI Dialog - Animation</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  <script src="./recursos/jquery.bgiframe-2.1.2.js"></script>
  <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
  
   <link rel="stylesheet" href="http://meusite/layout/css/geral.css" type="text/css" media="all" />
 
  <script>
  // increase the default animation speed to exaggerate the effect
  $.fx.speeds._default = 1000;
  $(function() {
    $( "#dialog" ).dialog({
      autoOpen: false,
      show: "blind",
      modal: true,
      hide: "explode",
      buttons: {
          Ok: function() {
            $( this ).dialog( "close" );
            $(this).load("./formulario.jsp");
          }
        }
    });
 
    $( "#opener" ).click(function() {
      $( "#dialog" ).dialog( "open" );
      return false;
    });
  });
  </script>
</head>
<body>
 
<div id="dialog" title="Basic dialog">
  <p>This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
&lt;/div&gt;
 
&lt;button id="opener"&gt;Open Dialog&lt;/button&gt;
 
 
&lt;/body&gt;
&lt;/html&gt;
Depois que o usuário clicar OK na janela modal, queria que abrisse a "formulario.jsp", porém tentei o código acima e não está indo...
Criado 18 de janeiro de 2013
Respostas 0
Participantes 1