hi and thanx for replying to this old mail of mine..
but i wonder if i may use it at all.... coz i hv just been laid off.
today will be the last day at this office..i guess it is a nice way to start
a new year.
 
bye and thanx for all who hv helped me and the others...
 
regards,
anoop
u may contact me at my personal mail id..
 
 
 
----- Original Message -----
Sent: Wednesday, January 02, 2002 3:04 PM
Subject: Re: Access of URL in Applet

Hi anoop,

  If it is necessary to use the applet may be u could try as below:

1) In the static html file use the following javascript code:

  <SCRIPT LANGUAGE="JavaScript">
<!--

var querystr = window.location.search.substring(1);
function sendToApplet() {
return querystr;
  }

//-->
</SCRIPT>

2) In the Applet  use the following java code

import netscape.javascript.JSObject; // comes with both IE & Netscape

...
In the applet init() method .. you can access the querystr value using the code..


JSObject win;
String querystr;
 try
 {
      win = JSObject.getWindow(this);
      querystr = (String)win.call("sendToApplet", new String[0]);
  }
  catch(Exception ex)
  {
     querystr = null;
  }

you can then parse the querystr as per your requirement

Regards,
srini

Reply via email to