Hi Rohit,
I am getting the message: "error on page" followed by a "done" on the left
hand corner of the explorer. After this control simply gets forwarded to the
page that I have set as "forward"(in struts-config.xml) value on "failure".
That is, the java script seems to be ignored by the browser.


Thanks,
Seshadhri

-----Original Message-----
From: Rohit Aeron [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 12:43 PM
To: Struts Users Mailing List
Subject: RE: How to add Java Script to a JSP page with struts tags


Hi Seshadhri

Then you must be getting javascript error .just look at the bottom left
corner of explorer & see what does it say .. Just mail me that error so that
I can will tell you more ...

Regards
Rohit

-----Original Message-----
From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 12:02 PM
To: 'Struts Users Mailing List'
Subject: RE: How to add Java Script to a JSP page with struts tags

Hi Rohit,
I tried doing the same but the problem persists. 
I have the following javascript code wherein I have used 'loginForm' for the
form name as I use <html:form action="login.do"> form tag. In the following
code 'userName' is a html:text and 'password' is a html:password entity.

function validate()
{

if(document.loginForm.userName.value=="")
 {
  alert("Please enter valid username");
  document.loginForm.userName.focus();
  return;
 }

if(document.loginForm.password.value=="")
{
 alert("Please enter the password");
 document.loginForm.password.focus();
 return;
}
}

Please help

Thanks,
Seshadhri Srinivasan

-----Original Message-----
From: Rohit Aeron [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 11:26 AM
To: Struts Users Mailing List
Subject: RE: How to add Java Script to a JSP page with struts tags


Try 

onclick="javascript:validate();"


regards
Rohit


-----Original Message-----
From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 11:20 AM
To: 'Struts Users Mailing List'
Subject: RE: How to add Java Script to a JSP page with struts tags

Hi,
I have created a login button using the <html:submit> tag. I wish to run a
Java Script function validate() when this submit button is clicked. I tried
using 'onclick = "validate()" ' within the html:submit tag, but it does not
work.

Please tell me how I can run Java Script code along with struts tags.

Thanks,
Seshadhri Srinivasan

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



*----------
This message and any attachment(s) is intended only for the use of the
addressee(s) and may contain information that is PRIVILEGED and
CONFIDENTIAL. If you are not the intended addressee(s), you are hereby
notified that any use, distribution, disclosure or copying of this
communication is strictly prohibited. If you have received this
communication in error, please erase all copies of the message and its
attachment(s) and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and
not of Kanbay.

Although we have taken steps to ensure that this e-mail and any
attachment(s) are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.


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

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


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

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

Reply via email to