struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcos Hernandez" <marco...@gmail.com>
Subject Re: Ajax forms not working - Problem with scriptaculous and dojo
Date Sat, 06 Oct 2007 22:08:44 GMT
I have the head tag first, then prototype and then Script.aculous and they
work perfectly well with Dojo. Had you switched order?

On 10/5/07, Dave Newton <newton.dave@yahoo.com> wrote:
>
> At one point the JavaScript load order when using
> Prototype was significant; I had to put the
> <s:head.../> tag before loading prototype.
>
> Note that Prototype does not always play well with
> other libraries.
>
> d.
>
> --- Moacir Cardoso <moacsjr@yahoo.com.br> wrote:
>
> > Hello people,
> >
> > I was unable to make my ajax s:form submit to work.
> > Then I tried to create a simple application from
> > struts2-blank-2.0.9.war
> > like this:
> >
> > <%@ taglib prefix="s" uri="/struts-tags" %>
> > <%@ page language="java" contentType="text/html;
> > charset=ISO-8859-1"
> > pageEncoding="ISO-8859-1"%>
> > <!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=ISO-8859-1">
> > <title>Hello Jsp</title>
> > <s:head debug="true" theme="ajax"/>
> > </head>
> > <body>
> >     <s:form action="HelloAjax_Table">
> >         <s:textfield name="txtNome"></s:textfield>
> >
> >         <s:submit value="Send Ajax" theme="ajax"
> > targets="div1"></s:submit>
> >     </s:form>  <br/>
> >     Div1: <br/>
> >     <div id="div1"></div>
> > </body>
> > </html>
> >
> > The result was fine, but if I add scriptaculous and
> > prototype.js an
> > error occurs.
> >
> > <head>
> > <script src="<%= request.getContextPath()
> > %>/js/scriptaculous/lib/prototype.js"
> > type="text/javascript"></script>
> > <script src="<%= request.getContextPath()
> > %>/js/scriptaculous/src/scriptaculous.js"
> > type="text/javascript"></script>
> > ...
> >
> > FATAL exception raised: Could not load
> > 'struts.widget.Bind'; last tried
> > '__package__.js'
> >
> > So, probably dojo have some problems with
> > scriptaculous or prototype.js.
> > Note that the tag <s:head debug="true"
> > theme="ajax"/> will output some
> > dojo scripts.
> >
> > Becouse that I will not use dojo anymore and  start
> > with scriptaculous
> > and prototype.js.
> >
> > Bye.
> >
> >
> > Dave Newton escreveu:
> > > If you set the debug flag do you get any error
> > > messages?
> > >
> > > --- Moacir Cardoso <moacsjr@yahoo.com.br> wrote:
> > >
> > >
> > >> Yes I do.
> > >>
> > >>
> > >>
> > >> Dave Newton wrote:
> > >>
> > >>> Do you have an <s:head theme="ajax"/> tag?
> > >>>
> > >>> --- Moacir Cardoso <moacsjr@yahoo.com.br> wrote:
> > >>>
> > >>>
> > >>>
> > >>>> Hi,
> > >>>> I'm unable to make my ajax form work
> > >>>>
> > >>>> <body>
> > >>>>
> > >>>> <div id='two' style="border: 1px solid
> > >>>> yellow;"><b>initial content</b></div>
> > >>>>  <s:form
> > >>>>       id="theForm2"
> > >>>>         cssStyle="border: 1px solid green;"
> > >>>>
> > >>>> action="cadastro/pessoa_salvarEndereco.action"
> > >>>>          method="post"
> > >>>>          theme="ajax">
> > >>>>
> > >>>>      <input type='text' name='data'
> > value='Struts
> > >>>> User'>
> > >>>>
> > >>>>      <s:submit value="GO2" theme="ajax"
> > >>>> targets="two"/>
> > >>>>
> > >>>>  </s:form>
> > >>>>
> > >>>> </body>
> > >>>>
> > >>>>
> > >>>>
> > >>>> It's making a normal http request and not using
> > >>>>
> > >> ajax
> > >>
> > >>>> calls.
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >
> >
> ---------------------------------------------------------------------
> > >
> > >>>
> > >>>
> > >>>> To unsubscribe, e-mail:
> > >>>> user-unsubscribe@struts.apache.org
> > >>>> For additional commands, e-mail:
> > >>>> user-help@struts.apache.org
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >
> >
> ---------------------------------------------------------------------
> > >
> > >>> To unsubscribe, e-mail:
> > >>>
> > >> user-unsubscribe@struts.apache.org
> > >>
> > >>> For additional commands, e-mail:
> > >>>
> > >> user-help@struts.apache.org
> > >>
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> >
> ---------------------------------------------------------------------
> > >
> > >> To unsubscribe, e-mail:
> > >> user-unsubscribe@struts.apache.org
> > >> For additional commands, e-mail:
> > >> user-help@struts.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
- Marcos H.
________________________________________
You must be the change you wish to see in the world
~ Gandhi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message