Hi Leena
Try this way it will work i have tired this and got it
the sample code which is used to test is below
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<%@ page language = "java" import="java.io.*"%>
<script language="javascript">
function helloman()
{
test.textbox.value = <% out.println(hello); %> ;
test.hello.selectedIndex=1;
}
</script>
</HEAD>
<BODY onLoad = "helloman(this)" BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
<form name="test">
<input type = "text" name="textbox" >
<select name = "hello">
<option value = "how">how</option>
<option value = "hi">hi</option>
</select>
<%!
String hello = "\"hellllllllo\"";
%>
</BODY>
</HTML>
Hope this Helps you
with regards,
Kumaran
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Can i use java objects in Javascript
Narayanaswamy, Kumaran (CTS) Mon, 04 Sep 2000 23:58:21 -0700
- Can i use java objects in Javascript Leena Albert
- Re: Can i use java objects in Javascript Scott Evans
- Re: Can i use java objects in Javascript Jeevan Mathew
- Re: Can i use java objects in Javascript Selvamani Jayakumar
- Re: Can i use java objects in Javascript Narayanaswamy, Kumaran (CTS)
- Re: Can i use java objects in Javascript Stefan Bushev
- Re: Can i use java objects in Javascript nfet nfet
