dcsimg
to open a internet explorer window from a frame
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   krishna_prasad
Posted On:   Wednesday, April 3, 2002 09:06 PM


how can a open window of InternetExplorer from my application
by clicking on any of the evant handling part

Re: to open a internet explorer window from a frame

Posted By:   srdjan_savkovicc  
Posted On:   Wednesday, May 29, 2002 02:01 PM


class BrowserControl{

public static void displayURL(String url){
boolean win = isWindows();
String cmd = null;

if (win) cmd = WIN_PATH +" "+ WIN_FLAG +" "+ url;
else cmd = UNIX_PATH +" "+ UNIX_FLAG + "("+url+")";
eTimer.openApp(cmd);
}

private static boolean isWindows(){
String os = System.getProperty("os.name");
if(os!=null && os.startsWith(WIN_ID))
return true;
else
return false;
}

public static void main(String[] args){
displayURL("http://www.ezone.danubius.co.yu");
}

private static final String WIN_ID = "Windows";
private static final String WIN_PATH = "rundll32";
private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
private static final String UNIX_PATH = "netscape";
private static final String UNIX_FLAG = "-remote openURL";
}


try this code like that:

BrowserControl.displayURL(yourURL);
it works at linux and windows, and open default browser.
answer me on ssrdjan@net.yu your expiriance.
About | Sitemap | Contact