You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Felipe Lorenz <fe...@gmail.com> on 2008/06/04 14:05:46 UTC

Help with remote div

Hi folks.

I've try to use remote divs, but the javascripts doesnt work, and i get some
exceptions!

This is my index.jsp

> <%@page contentType="text/html" pageEncoding="UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>    "http://www.w3.org/TR/html4/loose.dtd">
>
> <html>
>     <head>
>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>         <title>JSP Page</title>
>         <s:head theme="ajax"/>
>         <link href="css/flora/flora.tabs.css" rel="stylesheet"
> type="text/css"/>
>         <script type="text/javascript"
> src="script/jquery-1.2.3.min.js"></script>
>         <script type="text/javascript"
> src="script/ui.core.min.js"></script>
>         <script type="text/javascript"
> src="script/ui.tabs.min.js"></script>
>         <script type="text/javascript"
> src="script/jquery.maskedinput-1.1.3.pack.js"></script>
>     </head>
>     <body>
>         <div id="tab" class="flora" style="width: 714px; height: 325px;">
>             <ul class="ui-tabs-nav">
>                 <li id="1"><a href="#"><span>Dados Pessoais</span></a></li>
>                 <li id="2"><a href="#"><span>Endereço</span></a></li>
>             </ul>
>             <s:div id="the_Div"
>                    href="TH_DadosPessoais.jsp"
>                    loadingText="Carregando..."
>                    cssClass="ui-tabs-panel"
>                    executeScripts="true"
>                    separateScripts="false"
>                    theme="ajax">
>             </s:div>
>         </div>
>     </body>
> </html>


And this is my TH_DadosPessoais.jsp head

> <%@page contentType="text/html" pageEncoding="UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>    "http://www.w3.org/TR/html4/loose.dtd">
>
> <html>
>     <head>
>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>         <title>JSP Page</title>
>         <s:head theme="ajax" debug="true"/>
>         <link href="css/form.css" rel="stylesheet" type="text/css"/>
>         <link href="css/flora.datepicker.css" rel="stylesheet"
> type="text/css"/>
>         <script type="text/javascript"
> src="script/jquery-1.2.3.min.js"></script>
>         <script type="text/javascript"
> src="script/jquery.maskedinput-1.1.3.pack.js"></script>
>         <script type="text/javascript">
>             $(document).ready(function(){
>                 $("input").each(function(){
>                     $(this).focus(function(){
>                         $(this).css('background-color', '#F7FEA0');
>                     });
>                     $(this).blur(function(){
>                         $(this).css('background-color', 'white');
>                     });
>                 });
>                 $("#dataNasc_input").mask("99/99/9999", {placeholder:" "});
>                 $("#numCartHabilit_input").mask("99999999999",
> {placeholder:" "});
>                 $("#origem0").get(0).checked = true;
>                 document.getElementById("nom_condempr").focus();
>             });
>         </script>
>     </head>
>     <body>
>

I think the problem is the <scripts> tag, but i've try delete, but even a
simple alert('') dont work. Why?