what am I doing wrong?
Ok, I've just downloaded Anfy as it had a really cool hue rotator
applet that I liked but I can't get it to work on my website.
I can view it in FP when I open just the hue.html file and go to preview but
when I copy and past it to where I want it I just end up with a blank spot
and if I place the mouse over the area, it shows the it's working at
something but nothing ever happens. The code is there on the html view page
so what am I doing wrong?
It's probably something really simple but I just can't figure it out.
This is my first experience with applets so please forgive my ignorance!
Sometimes the most tricky part about an applet is where you store its .class file and how you tell the web-page where to find it.
It sounds like that *might* be what's going on... But the best way to offer some help is if you have a URL of where you put the html page with its embedded applet. This allows forum members to take a look at your html code as well as the page the applet is on.
Often, if you pass your cursor over the applet on the html page, in the blink of an eye, you'll catch an error code that flashes in the status bar. So it's helpful to have an example to point to at a live site. Do you have a URL example? if not, maybe you can post the <applet html coding you're using on your html page?
PS: Your post mentioned, 'forgiving your ignorance'...
perhaps the smartest non-ignorant action is knowing when you need to learn more, and seeking that knowledge! Kudos to you!!
Thanks for the offer of help Jim, like you say, I don't think it's stored in the right place looking at the error messages, but I'm not sure what I'm doing wrong or where it should be!
This is a link that shows it working -
I've just put it at the bottom of this page for you so you can see what I'm getting when I try to put it where I want it (It's ment to replace my logo)-
I've just noticed the error message that flicks up -
I was thinking that it might be something to do with the fact that my site is ASP, but I have also tried inserting it into my pwp ( http://www.lisaclaydon.pwp.blueyonder.co.uk/home.html ) which is html but it won't work there either.
I've just checked the error message there and it says - load:class huerot not found.
I'm afraid that I don't know much about web building either, only what I've had to learn!
Someone started me off with a couple of pages and then just left me to get on with it and told me that any new pages had to have .asp on the end of them!
My pwp is just where I mess around with stuff and get photos online to show people other work that I do.
Well I hope I've given you something useful to work from there!
Short answer: change the codebase and image param values in your applet to provide absolute links to your applet class files and supporting (image) files.
More elaboration: ;-)
In looking at the code on your middle.asp page which is in the bottom frame of your main.asp page, I see that the image source code parameter in the applet is the same as for your working html page. <<<HUH???
Some Applets can have parameter(<param ) values to set. When the Java applet is called to action by the html page, the parameter values 'feed' certain information to the java applet which it relies upon to render its desired result. The coding in the applet tag on the html page will have the parameter name and the parameter value. The param name will never change, but the values are sometimes fun to play with just to see how much they do or do not affect what the applet does.
Your particular applet uses an image to act upon, and has a parameter (aka: "param") requiring the location of that image within your web server.
By putting the applet in your main.asp page, you have changed the location of that applet within your web server. It's no longer in the same directory as your class files and any supporting (image) files for that applet. Since the applet has changed directories, you need to tell it where to find the image file you want it to act upon.
I created an html file with absolute links to the applet files (codebase="...) and the supporting image file and it all seemed to work well:
<applet archive="huerot.jar" codebase="http://www.claydon-creations.co.uk/new%20photos/buttons/applets/" code="huerot.class"
<param name="image" value="http://www.claydon-creations.co.uk/new%20photos/buttons/links.banners/Claydon-Creations.logo.jpg"
Using the absolute html links for your applet parameters can help if you are using the applet in various web pages which may not be within the same directories on your web server.
Hope this helps!
I didn't quite get all that you were saying! but it's working now, thanks to your code, take a look.
I don't think I ever would have worked it out on my own, your a gem!
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL