Scott MacMaster
September 27th, 1999, 06:15 AM
I have a drop down control and the items in it are links. The code I have to do this will work for absolute links like http://www.winzip.com:
String url = "http://www.winzip.com";
try { theURL = new URL(url); }
catch ( MalformedURLException e)
{
System.out.println("Bad URL: " + theURL);
}
getAppletContext().showDocument(theURL);
but it work work for relative links:
String url = "index.html";
try { theURL = new URL(url); }
catch ( MalformedURLException e)
{
System.out.println("Bad URL: " + theURL);
}
getAppletContext().showDocument(theURL);
Does anyone know why it won't work or how to get it to work?
Scott
Give a man a fish and feed him for a day,
Teach a man to fish and feed him for life.
_______________________________________________________
http://welcome.to/scottweb - The Ultimate Programmers Reference
String url = "http://www.winzip.com";
try { theURL = new URL(url); }
catch ( MalformedURLException e)
{
System.out.println("Bad URL: " + theURL);
}
getAppletContext().showDocument(theURL);
but it work work for relative links:
String url = "index.html";
try { theURL = new URL(url); }
catch ( MalformedURLException e)
{
System.out.println("Bad URL: " + theURL);
}
getAppletContext().showDocument(theURL);
Does anyone know why it won't work or how to get it to work?
Scott
Give a man a fish and feed him for a day,
Teach a man to fish and feed him for life.
_______________________________________________________
http://welcome.to/scottweb - The Ultimate Programmers Reference