Run applet in browser when html file is stored in different dir.
I have a SiteSelector.class stored in: "D:\DATA\Java Programmes\Networking\"
and a SiteSelector.html stored in :"D:\DATA\Java Programmes\Networking\HTML files\"
Here is a part of the code of SiteSelector.html:
..........
..........
..........
<applet code= "SiteSelector.class"
width=500
height=500
codebase="D:\\DATA\\Java Programmes\\Networking\\"
archive=""
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
>
<param name = "title0" value = "Java Home Page">
<param name = "location0" value = "http://java.sun.com/">
<param name = "title1" value = "Deitel">
<param name = "location1" value = "http://www.deitel.com/">
<param name = "title2" value = "JGuru">
<param name = "location2" value = "http://www.jGuru.com/">
<param name = "title3" value = "JavaWorld">
<param name = "location3" value = "http://www.javaworld.com/">
Your browser is ignoring the <APPLET> tag!
</applet>
...........
...........
...........
Since html file and .class file are stored in different directories so in applet tag I specify absolute url in "codebase = ......" to indicate that the browser should look for .class file in "D:\DATA\Java Programmes\Networking\".
But when I run the Applet in the browser, nothing happens. But when I copy the html file back to "D:\DATA\Java Programmes\Networking\" and change the codebase = "D:\\...." to codebase = "." It works well. Any one can help me to hanld this problem. I want to run the applet in the browser when the html file is stored in different directory. Thank you.
Message was edited by:
beckham12a18
Message was edited by:
beckham12a18
Message was edited by:
beckham12a18
Message was edited by:
beckham12a18

