RE: Struts with javascript

2006-03-29 Thread José María Tristán
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

Re: Struts with javascript

2006-03-29 Thread Deepa Khetan
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

Struts with javascript

2006-03-29 Thread Jose Maria Tristan
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?

RE: why my page can't redirect under Struts with Javascript?

2006-02-21 Thread Scott Purcell
Within my javascripts, when I want to post to a different action, I use this struts tidbit:

Re: why my page can't redirect under Struts with Javascript?

2006-02-21 Thread Gary Feidt
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread red phoenix
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread Dave Newton
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 --

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread Saul Qunming Yuan
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread Martin Gainty
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread Dave Newton
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread red phoenix
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread Jari Fredriksson
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(

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread Swapnil Patil
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, > >

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
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? > > > > > > > > > > > > >

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread raja sekar
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
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.

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread raja sekar
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, >

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
> > > > 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

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread Swapnil Patil
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&

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread 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

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread Saul Qunming Yuan
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

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
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); >

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread Saul Qunming Yuan
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();

why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
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