Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to call script in jsp

843838Feb 8 2007 — edited Nov 21 2007
How to call script in jsp
3A-_@. Feb 8, 2007 3:08 AM


Hi,
I have abc.jsp file where i want to call javascript on pressing submit button.
<input type="text" name="UserName" value="" width="30" />

<input type="submit" value="Submit" onclick=" <what should i write here??">
here how to call script?



and in the same abc.jsp file i have javascript ( i am not sure about the way i m accessing text value inside javascript is right or not)

<SCRIPT LANGUAGE="javascript" >
here how can i access UserName field value here??

if(isThisNotNull(UserName))
alert("UserName Is Mandatory");

</SCRIPT>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2007
Added on Feb 8 2007
7 comments
134 views