Oh my eyes!, now seriously, that is kind of hard to read (and you
didn't even say what field it was). Tips:

* Put all that inlined javascript in functions.
* Check for javascript errors on the page
* Minimize the example to something small that replicates the problem
* This is not an struts problem but we might give you a hand if you
provide an small example

regards
musachy

On Wed, Apr 2, 2008 at 4:35 PM, phms <[EMAIL PROTECTED]> wrote:
>
>  Folks,
>
>  I have a JSP page in which i need to set a hidden field (mode) using
>  javascript and send it to a form using struts. The  code works on Firefox
>  but in IE the field is not modifyed (null). Below is my code:
>
>  <%@ page language="java" %>
>  <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>
>  <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
>  <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>
>
>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>  <html xmlns="http://www.w3.org/1999/xhtml";>
>
>  <%@ page import="java.util.List" %>
>  <%@ page import="com.redewireless.psiw.common.business.Facade" %>
>  <%@ page import="com.redewireless.psiw.common.model.PsiwUser" %>
>  <%@ page import="com.redewireless.psiw.common.util.Constants" %>
>  <%@ page
>  import="com.redewireless.psiw.applications.smsmanager.model.SmsGroup" %>
>  <%@ page
>  import="com.redewireless.psiw.applications.smsmanager.model.SmsGroupMember"
>  %>
>  <%@ page import="com.redewireless.psiw.common.util.WordWrapper" %>
>
>  <head>
>  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
>  <title>mobiw : Plataforma de Serviços de Interatividade Wireless</title>
>  </head>
>
>  <link href="css/css_main.css" rel="stylesheet" type="text/css" />
>
>
>  <link rel="stylesheet" href="css/new.css" type="text/css" media="screen" />
>
>
>  <link title="calendar-brown" href="js/calendar-smsp.css" media="all"
>  type="text/css" rel="stylesheet" />
>
>  <script type="text/javascript" src="js/calendar.js"></script>
>  <script src="js/calendar-pt.js" type="text/javascript"></script>
>  <script src="js/calendar-setup.js" type="text/javascript"></script>
>  <script type="text/javascript" src="js/overlib.js"></script>
>  <script type="text/javascript" src="js/overFunc.js"></script>
>  <script type="text/javascript" src="js/j.js"></script>
>
>  <script language="JavaScript" type="text/javascript">
>  <!--
>         var helpFrame='<!--[if lte IE 6.5]><iframe></iframe><![endif]-->';
>
>  function adiciona(){
>   document.forms[0].smsGroupId.value="";
>   document.forms[0].name.value="";
>   document.forms[0].description.value="";
>   document.forms[0].mode.value="add";
>   document.forms[0].submit();
>   return true;
>  }
>  -->
>  </script>
>  <body bgcolor="#eeeeee" leftmargin="0" topmargin="0" rightmargin="0"
>  bottommargin="0" marginwidth="0" marginheight="0">
>
>         <%
>                 //Global variables
>                 Facade facade = Facade.getInstance();
>                 PsiwUser user = (PsiwUser)
>  request.getSession().getAttribute(Constants.USER_KEY);
>                 List<SmsGroup> groups = facade.getSmsGroups(user);
>         %>
>
>  <div class="select-free" id="overDiv" style="position:absolute;
>  visibility:hidden; z-index:10000;"></div>
>          imagens/espaco.gif <br />
>  <div align="center">
>
>  <table width="763" border="0" cellspacing="0" cellpadding="0">
>   <tr>
>     <td> imagens/topo_sec.gif <br /></td>
>   </tr>
>   <tr>
>     <td background="imagens/bg_sec.gif" align="center">
>                 <%@ include file="topo.jsp" %>
>                 <br /><br />
>         </td>
>   </tr>
>   <tr>
>     <td background="imagens/bg_sec.gif" align="center">
>                 <!-- CONTEÚDO DA PÁGINA -->
>                 <table width="745" border="0" cellspacing="0" cellpadding="0">
>                 <html:form styleId="manageSmsGroupForm" method="POST"
>  action="ManageSmsGroup" enctype="multipart/form-data">
>                         <html:hidden property="mode" styleId="mode"/>
>                         <html:hidden property="name" styleId="name"/>
>                         <html:hidden property="description" 
> styleId="description"/>
>                         <html:hidden property="smsGroupId" 
> styleId="smsGroupId"/>
>                         <html:hidden property="page" styleId="page" 
> value="0"/>
>                         <tr>
>                                 <td align="left">
>
>                                          sec_msg_menu_operacoes.jsp 
> GERENCIAMENTO DE ENVIO DE MENSAGENS  >
>  GERENCIAMENTO DE GRUPOS
>                                 <br /><br />
>
>                                 </td>
>                         </tr>
>
>                         <tr>
>                                 <td align="left">
>
>                                  imagens/seta_cinza.gif  
> <strong>Gerenciamento de grupos</strong><br
>  /><br />
>
>
>                                         <!-- MENSAGEM DE SUCESSO OU ERRO -->
>                                         <table width="100%" border="0" 
> cellspacing="0" cellpadding="0">
>                                           <tr>
>                                                 <logic:equal name="status" 
> value="success">
>                                                         <td 
> background="imagens/linha_sucesso.gif" align="center"
>  valign="middle" height="32">
>
>                                                                         
> Operação realizada com sucesso!<br />
>
>                                                         </td>
>                                                 </logic:equal>
>                                                 <logic:equal name="status" 
> value="error">
>                                                         <td 
> background="imagens/linha_erro.gif" align="center"
>  valign="middle" height="32">
>
>                                                                         
> Operação não pôde ser realizada. Tente novamente mais tarde.<br />
>
>                                                         </td>
>                                                 </logic:equal>
>                                           </tr>
>                                         </table>
>                                         <logic:notEqual name="status" 
> value="none">
>                                                 <br />
>                                         </logic:notEqual>
>                                         <!-- MENSAGEM DE SUCESSO OU ERRO -->
>                                         <%
>                                         if(groups != null && groups.size() > 
> 0){
>                                         %>
>                                         <!-- tabela de GRUPOS -->
>                                         <table width="740" border="0" 
> cellspacing="2" cellpadding="4">
>                                                 <tr>
>                                                         <td bgcolor="#f3efe9" 
> align="center" valign="middle" width="30">Id<br
>  /></td>
>                                                         <td bgcolor="#f3efe9" 
> align="center" valign="middle" width="135">Nome
>  do grupo<br /></td>
>                                                         <td bgcolor="#f3efe9" 
> align="center" valign="middle"
>  width="385">Descrição<br /></td>
>                                                         <td bgcolor="#f3efe9" 
> align="center" valign="middle"
>  width="75">Editar<br /></td>
>                                                         <td bgcolor="#f3efe9" 
> align="center" valign="middle"
>  width="75">Excluir<br /></td>
>                                                 </tr>
>                                           <%
>                                                 String groupId;
>                                                 String groupName;
>                                                 String groupDescription;
>
>                                                 String removeButton;
>                                                 String editButton;
>
>                                                 for(int i = 0; i < 
> groups.size(); i++){
>                                                         groupId = 
> Long.toString(groups.get(i).getSmsGroupId());
>                                                         groupName = 
> groups.get(i).getName();
>                                                         groupDescription = 
> groups.get(i).getDescription();
>
>                                                         editButton = 
> "document.getElementById('smsGroupId').value='" +
>  groupId + "';document.getElementById('name').value='" + groupName +
>  "';document.getElementById('description').value='" + groupDescription +
>  "';document.getElementById('mode').value='edit';";
>                                                         removeButton = 
> "document.getElementById('smsGroupId').value='" +
>  groupId + "';document.getElementById('name').value='" + groupName +
>  "';document.getElementById('description').value='" + groupDescription +
>  "';document.getElementById('mode').value='rem';";
>                                                 %>
>                                                         <tr>
>                                                                 <td 
> bgcolor="#eeeeee" align="center" valign="middle">
>                                                                 
> <%=groupId%><br />
>                                                                 </td>
>                                                                 <td 
> bgcolor="#eeeeee" align="left" valign="middle">
>                                                                 
> <strong><%=groupName%></strong><br />
>                                                                 </td>
>                                                                 <td 
> bgcolor="#eeeeee" align="left" valign="middle">
>                                                                         
> <%=WordWrapper.wrapTextByColumnWidth(groupDescription, 385)%><br />
>                                                                 </td>
>                                                                 <td 
> bgcolor="#eeeeee" align="center" valign="middle">
>                                                                         
> <html:image src="imagens/bot_exclamacao.gif" border="0"
>  property="Submit" value="Submit" alt="Submit"
>  onmouseover="overlib(helpFrame+'Clique aqui para editar os parâmetros deste
>  grupo.', CSSCLASS, FGCLASS, 'ol_class_fg', BGCLASS, 'ol_class_bg',
>  TEXTFONTCLASS, 'ol_class_fn', TIMEOUT, null, DELAY, null);"
>  onmouseout='nd()' onclick="<%=editButton%>"/><br />
>                                                                 </td>
>                                                                 <td 
> bgcolor="#eeeeee" align="center" valign="middle">
>                                                                         
> <html:image src="imagens/bot_excluir.gif" border="0"
>  property="Submit" value="Submit" alt="Submit"
>  onmouseover="overlib(helpFrame+'Clique aqui para remover este grupo.',
>  CSSCLASS, FGCLASS, 'ol_class_fg', BGCLASS, 'ol_class_bg', TEXTFONTCLASS,
>  'ol_class_fn', TIMEOUT, null, DELAY, null);" onmouseout='nd()'
>  onclick="<%=removeButton%>"/><br />
>                                                                 </td>
>                                                         </tr>
>                                                 <% } %>
>                                         </table>
>                                         <% } %>
>
>                                         <!-- FIM da tabela de GRUPOS -->
>                                         <br />
>
>                                         <table width="740" border="0" 
> cellspacing="0" cellpadding="0">
>                                                 <tr>
>                                                         <td align="right">
>                                                                 <html:image 
> src="imagens/bot_ad_grupo.gif" border="0"
>  property="Submit" value="Submit" alt="Submit"
>  onclick="javascript:adiciona()"/>
>                                                                 <br />
>                                                         </td>
>                                                 </tr>
>                                         </table>
>                                         <br />
>                                 </td>
>                         </tr>
>                 </html:form>
>                 </table>
>                 <!-- CONTEÚDO DA PÁGINA -->
>         </td>
>   </tr>
>   <tr>
>     <td> imagens/bottom_sec.gif </td>
>   </tr>
>   <tr>
>     <td align="left">
>
>         &nbsp;&nbsp;mobiw v1.0.0 (c) 2007. Rede Wireless ltda. Todos os 
> Direitos
>  Reservados.<br /></td>
>   </tr>
>  </table>
>  </div>
>
>  </body>
>  </html>
>
>  --
>  View this message in context: 
> http://www.nabble.com/Hidden-field-null-in-IE-tp16451002p16451002.html
>  Sent from the Struts - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to