ok.
Thank you very much.
-Mensaje original-
De: Deepa Khetan [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 29 de marzo de 2006 11:55
Para: Struts Users Mailing List
Asunto: Re: Struts with javascript
When the HTMl page is rendered on screen, all the struts controls are
rendered as
When the HTMl page is rendered on screen, all the struts controls are
rendered as normal HTMl controls. So u can refer them as document.forms
[0].cadenaDesdeText.value.
On 3/29/06, Jose Maria Tristan <[EMAIL PROTECTED]> wrote:
>
> Hi:
>
>I have a text: maxlength="10"/>.
>I need us
Hi:
I have a text: .
I need use this control in a function of javascript.
Por example
function showText(){
alert(cadenaDesdeText);
}
How can i use any control of struts into a function? How i can refer to
the
name of the control?
Within my javascripts, when I want to post to a different action, I use
this struts tidbit:
I'm sorry, but this is a Javascript issue. If you want to use Struts,
use Struts. Create an ActionForm to get your value from the drop-down
list and then redirect to any number of Actions from your Action. I
believe that is the easiest way, and a LOT less time consuming then
sending all of these
I try follows:
function goURL(tmp){
document.forms[0].submit();
}
I debug the Javascript,when running the statement
document.forms[0].submit();
Javascript raise a error:
Microsoft JScript running error:object can't support this attribute or
method
Why?
On 2/21/06, Dave Newton <[EMAIL PROTEC
Martin Gainty wrote:
> If you are looking for a way for JavaScript to dynamically change
> targetting action based on Javascript code take a look at
> http://husted.com/struts/tips/002.html
Uh, no, I was answering the OP with regards to his hosed up JavaScript :)
Dave
--
Sorry, my bad, I didn't even think about that. Right, you don't need the
"eval" here.
Saul
- Original Message -
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Monday, February 20, 2006 7:17 PM
Subject: Re
s Mailing List"
Sent: Monday, February 20, 2006 8:17 PM
Subject: Re: why my page can't redirect under Struts with Javascript?
red phoenix wrote:
I tried follows:
function goURL(tmp){
document.forms[0].action=eval("/Log/log.do?action=First");
document.forms[0].submit();
}
an
red phoenix wrote:
> I tried follows:
> function goURL(tmp){
> document.forms[0].action=eval("/Log/log.do?action=First");
> document.forms[0].submit();
> }
>
> and
> function goURL(tmp){
> document.forms[0].action=eval("/log.do?action=First");
> document.forms[0].submit();
> }
>
> My page
I tried follows:
function goURL(tmp){
document.forms[0].action=eval("/Log/log.do?action=First");
document.forms[0].submit();
}
and
function goURL(tmp){
document.forms[0].action=eval("/log.do?action=First");
document.forms[0].submit();
}
My page also can't redirect!
And I try
function g
Swapnil Patil wrote:
Hi,
I modify my Javascript like follows:
function goURL(tmp){
document.forms[0].action=eval("/Log/log.do?action=First");
document.forms[0].submit();
}
Is eval really needed? . Check whether you really need /Log in
contexet path?
Try wih following function.
function goURL(
t; or do it in two steps:
> > > >
> > > > var newAct = "/Log/log.do?action="+tmp;
> > > > document.forms[0].action = newAct;
> > > >
> > > > 2) how are you checking the action parameter in your Action class,
> >
asript can alert right value,such as
> > /Log/log.do?action=3
> > > > > > but I find Javascript don't redirect any page,my action don't be
> > > > called!
> > > > > > Why?
> > > > > >
> > > > > >
>
A few things here,
> > > > > >
> > > > > > 1) I think you need build the action like the following;
> > > > > >
> > > > > > document.forms[0].action=eval("/Log/log.do?action="+tmp);
> > > > > >
&g
build the action like the following;
> > > > >
> > > > > document.forms[0].action=eval("/Log/log.do?action="+tmp);
> > > > >
> > > > > or do it in two steps:
> > > > >
> > > > > var newAct = "/Log/log.
on = newAct;
> > > >
> > > > 2) how are you checking the action parameter in your Action class,
> > > > checking
> > > > action=First or action=0?
> > > > the above will give you action=0, or action=1 etc, but not
> > action=First,
>
>
> > > 2) how are you checking the action parameter in your Action class,
> > > checking
> > > action=First or action=0?
> > > the above will give you action=0, or action=1 etc, but not
> action=First,
> > > action=Second. The reason I as
b/c you mentioned
> > > page="/log.do?action=First">First Page works for you, you
> are
> > passing a "First" to the action in this case.
> >
> >
> > Saul
> >
> > - Original Message -
> > From: "red phoenix&
action=First">First Page works for you, you are
> passing a "First" to the action in this case.
>
>
> Saul
>
> - Original Message -
> From: "red phoenix" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> Sent: Sunday, Feb
t" to the action in this case.
Saul
- Original Message -
From: "red phoenix" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Sunday, February 19, 2006 10:12 PM
Subject: Re: why my page can't redirect under Struts with Javascript?
My
From: "red phoenix" <[EMAIL PROTECTED]>
> To:
> Sent: Sunday, February 19, 2006 6:48 PM
> Subject: why my page can't redirect under Struts with Javascript?
>
>
> I use Javascript in Struts,like follows:
>
>
> function goURL(tmp){
> alert(tmp);
>
OTECTED]>
To:
Sent: Sunday, February 19, 2006 6:48 PM
Subject: why my page can't redirect under Struts with Javascript?
I use Javascript in Struts,like follows:
function goURL(tmp){
alert(tmp);
document.forms[0].action="/log.do?action="+eval(tmp);
document.forms[0].submit();
I use Javascript in Struts,like follows:
function goURL(tmp){
alert(tmp);
document.forms[0].action="/log.do?action="+eval(tmp);
document.forms[0].submit();
}
First Page
First
Second
Third
when click "First Page",I can redirect my page to log.do page,but when I
change the value of select,an
24 matches
Mail list logo