How to stop action getting called on click of refresh button

2009-01-30 Thread Parvat Singh Ranawat
Hi,
Can I stop the calling of action on click of refresh button as on this
action it will generate a report at some specified location.
So on every refresh click will generate a new report at that location which
is unacceptable.

So is there any way to stop calling the action/ have one flag on action
which determines this part of code in action need not be executed on click
on refresh button.

Regards,
Shakti


problem in writing scope=session in actionMappingDefination

2006-09-04 Thread Parvat Singh Ranawat

Hi All,

I wanted to know what are the drawbacks of using
SCOPE= session in place of request in actionMappingDefination

 action name=formName  type=ActionName
validate=false parameter=action scope=request
path=/xyz/abc

Is it all depend upon our requirement or it is good practice to use
scope=request in place of session
as if we do so it ll take lot of memory to store list of data in the
sessionScope that may be avoided

please do give me some suggestions as in my application some work can be
accomplished by keeping scope=session
and i can do the work by keeping scope=request but some additional code is
required to do that .

so should I go with scope=session or not

Regards

Shakti Singh


check box should behaves as radio button

2006-08-16 Thread Parvat Singh Ranawat

Hi,

Thanks to all for helping me in Struts problem
here now i got stucked in one problem

Here i need to show check box in UI but this must behaves like Radio button
so how to do that i wrote java script to do that but it is not working
perfectly

please help me out
Thanks in advance

Shakti Singh


Re: two form one jsp

2006-08-02 Thread Parvat Singh Ranawat

hi ,

The problem in using document.form[0]. and document.form[1] for first and
second form respctively
first form comes from  Header.jsp and second form from myFoo.jsp and Header
is there through out Application
and the functionality that is part of Header that I need to write in
myFoo.jsp there i need to pass same actionForm (This is where problem
occured). And also i want myFoo.jsp as part of some Popup functionality
where there is no Header.jsp included so in that case  we have single form
so document.form[1] will not work

please  suggest

Thanx
Shakti


On 02/08/06, Monkeyden [EMAIL PROTECTED] wrote:


Can we please stop suggesting use of the form name?  It.will.not.work.  If
both forms have the same name, it makes a reference to document.forms
['foo']
an array and not a reference to the form.  Of course you *could *do this:

html
head
/head
script language=JavaScript type=text/javascript
function tellMe(){
   alert(Form 1:  + *document.forms['foo'][0].form2Text.value*);
   alert(Form 2:  + *document.forms['foo'][1].form2Text.value*);
}
/script
body
form action=foo method=post name=foo id=foo
   input type=text name=form2Text value=This is 1
/form
form action=bar method=post name=foo id=bar
   input type=text name=form2Text value=This is 2
/form
input type=button name=myButton value=Click It onclick=tellMe();
/body
/html

but A, that would be stupid, and B, you have to use the index value
anyway.

On 8/1/06, kalpesh modi [EMAIL PROTECTED] wrote:

 I am not sure whether

 document. form['formName'] will work or not. Give it a try.

 -Kalpesh



 -
 Yahoo! Music Unlimited - Access over 1 million songs.Try it free.





Re: two form one jsp

2006-08-02 Thread Parvat Singh Ranawat

Hi All n Kalpesh,

Here I can use seperate formBean but this may not be good practice...
actually somebody suggested me to pass the form object  as parameter in
function while calling java script

like


script language=JavaScript type=text/javascript

function fooBar( form){

if(form.criteria.value==' ' || form.criteria.value==null)

{

alert(Please provide criteria);

return false;}

//code to perform some function

}
form action= 

html:img page= 

onclick=fooBar(this.form) /

This is working fine for most of the code but for one html:img
onclick= / it is not able to call java script (giving some js error as
form is not object)

What is the problem I didnt get  if it(form) is not object then why it
is working for other code

please suggest if this is good or I can Trustful approach

Thanks

Shakti Singh







On 02/08/06, kalpesh modi [EMAIL PROTECTED] wrote:


Is it not possible to use two seperate form beans?

-Kalpesh


-
How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone call
rates.



two form one jsp

2006-07-31 Thread Parvat Singh Ranawat

Hi all,

I'm attempting to create a JSP that is made up of two forms.  Each
form needs a same  form bean and is processed by a same
action.  The catch is that the one form comes from Header (This will be
there for all the pages as part of left panel )

and second is coming from my jsp  and  problem occures while calling JAVA
SCRIPT

ie
1) if I use document. form[0]  then this always points to the first form
(which is there in Header)
2) if I use document.formName
then there is ambiguity which form to call.

so how to work in this situation


Thanks

Shakti