Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
WebDwarf, SiteSpinner, SiteSpinner Pro 'How do I...'
java script applets|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Junior Mechanic |
I'm using code to try to use some java applets. However, the code doesn't seem to run and all I get is a grey box on the web page. The java archive is in the same directory as the web page. Any idea about what's going wrong?
|
||
|
VM Staff![]() |
Hi gbh,
Are you Publishing it to your webhost? If so, are you using the built-in Gather option? Do you have a link we could look at. - Derry |
|||
|
|
Junior Mechanic |
Since I'm just learning how to do this I'm just publishing to a directory on my computer. The applets that I'm trying to use can be found at http://math.hws.edu/javamath/config_applets. I'm trying to create a math enrichment page for my hs students. I'm using the example code listed on the page verbatim; just copying and pasting it in a code box. Yes, I'm using the gather check box.
|
|||
|
|
Honorary Mechanic |
Firstly, your title is wrong .. it should be java applets .. not java script applets.
Don't confuse java with javascript .. Your problem may be that in Site Spinner Preview mode the java files are not found. I have experimented .. with a simple applet .. from here .. htmlgoodies.com From this tutorial, downloaded urname.class and placed into the Site Spinner Publish folder Inserted following applet .. by code editor rather than import foreign object. <APPLET CODE="urname.class" WIDTH="250" HEIGHT="22"> </APPLET> Then Previewed .. In SiteSpinner Preview mode I can only see the grayed out applet window, as you report. But if I then Publish into a folder containing the applet code, the applet works by launching the published HTML page in browser. ... Diagnostics .. In your system tray there should be a java coffee cup icon. Right click on this and "open console" You will see errors .. look for "the system cannot find the path specified". ... I found that by placing the file urname.class file into in Site Spinner preview folder (inside Site Spinner installation folder) I could preview the java applet without need to publish first. Conclusion .. watch your file paths ! This message has been edited. Last edited by: D_L, |
|||
|
|
Honorary Mechanic |
|
|||
|
|
Working Mechanic |
I've wandered round the web looking for java scripts and incorporating them into my site to enable users to "Add to favorites", force "Full screen mode", "Next / Previous page", etc etc.
Judging by the number of errors I get when validating my HTML, I've made a bunch of terrible mistakes when inserting the scripts. I noticed that the SS Page Editor enables you to "redirect a page after x seconds". I want to redirect to a page that will open in Full Screen mode. (any help would be appreciated, but that is not the purpose of this post). Wouldn't it be great if Sitespinner had a library of navigational aids (java and others maybe) that we could simply paste in when needed!!! If it was an additional module, I would certainly pay for it! If this already exists, please tell me where to find it in the manual! Thanks guys. Sitespinner is the best piece of software I ever bought - and it's getting better all the time! |
|||
|
Guru 'Power' Mechanic![]() |
No, a library like that doesn't already exist. There are two Javascript "gadgets" already present:
I looked at one of SiteSpinner's (inferior!) competitors recently, and that had a library of gadgets, one of which was a cursor trail. If there is any interest, we could start a new thread in the Feature Request forum -- "Suggested Javascript Gadgets", with suggestions and hopefully pointers to working code. Some gadgets I have used. You'll find a "make full-screen window" there too. |
|||
|
|
Honorary 'Grease Monkey' Mechanic |
I like this idea !!! and if we must not abused of gadgets, it still sometimes gives useful service or can also enlight some dull pages... Anyway thanks Bruceee for the codes on your site ! I think some of them are very useful and agree to share and/or find others ! |
|||
|
VM Staff![]() |
A 'JavaScript' library might be a good idea
I believe the VMI Development Gods mused about Web Engine 'Widgets' (or some other name) at one time. Basically the idea goes that someone could create a neat effect in Web Engine, and then post it as a Widget that others could use on their pages. Just a thought... - Derry |
|||
|
|
Working Mechanic |
Bruceee,
I really must apologise. I just posted a question about Full Screen windows then discovered that you already answered it maybe months ago in this very section. I really must come back to the forum more often. (I've now turned my Notifications ON). Regarding "<SCRIPT type="text/javascript"> window.resizeTo (screen.availWidth, screen.availHeight); window.moveTo (0, 0); </SCRIPT>" is there any way I can assign this script as a link to my "TURN ON FULL SCREEN" button - to avoid annoying users by forcing a full screen window on page load.???? Thanks Bruceee |
|||
|
Guru 'Power' Mechanic![]() |
Try amending the code to this:
<SCRIPT type="text/javascript">
function resize() {
window.resizeTo (screen.availWidth, screen.availHeight); window.moveTo (0, 0);
}
</SCRIPT>This turns it into a javascript function which you can call from a link as discussed here. |
|||
|
|
Working Mechanic |
Sorry to be so dumb, Bruceee. I've been trying for the past two months (on and off!) to create a link with the "my function" thing but just have not succeeded.
Could you kindly show me - step by step - how to link the following script to an image? Thanks in advance! Mike <script> <!-- function fullwin(){ window.open("diapos-slides.html","bfs","fullscreen,scrollbars") } //--> </script> <center> <form> <input type="button" onClick="fullwin()" value="Diaporamas-Slideshows"> </form> </center> |
|||
|
|
Working Mechanic |
Bruceee,
I just realized that the script in question actually creates a java button, whereas I want to link it to a pretty picture instead. Possible??????? |
|||
|
Guru 'Power' Mechanic![]() |
Yes, instead of the second half of the code starting <center>, put a link on your pretty picture like this:
link type: leave blank link URL: javascript:fullwin() More in this thread. Put the rest of the code on your page as a 'Code Object' -- icon on the left-hand toolbar. You will need to have a page named diapos-slides.html for the fullwin() code to work as you have it. I would remove the dash (-) from the page name -- it's safest to restrict file and page names to letters and number only. If you do that, you will need to modify the page name in the code too. |
|||
|
|
Working Mechanic |
Well how can I thank you enough Bruceee? It works! You are AWESOME! I you ever come to France, be sure to let me know! Happy New Year!
|
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

