Moderators: Derry, Goldie, Harpo
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
gbh
Junior Mechanic
Posted
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?
 
Posts: 2 | Registered: July 19, 2004Reply With QuoteEdit or Delete MessageReport This Post
VM Staff
Picture of Derry
Posted Hide Post
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
 
Posts: 4167 | Location: Toronto, Canada | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
gbh
Junior Mechanic
Posted Hide Post
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.
 
Posts: 2 | Registered: July 19, 2004Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
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,
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Posted Hide Post
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!
 
Posts: 51 | Location: Loches, France | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Power' Mechanic
Picture of Bruceee
Posted Hide Post
No, a library like that doesn't already exist. There are two Javascript "gadgets" already present:
  • Popups for images
  • Mouseovers

    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.
  •  
    Posts: 9258 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Honorary 'Grease Monkey' Mechanic
    Picture of Barry888
    Posted Hide Post
    quote:
    we could start a new thread in the Feature Request forum -- "Suggested Javascript Gadgets", with suggestions and hopefully pointers to working code.
    I like this idea !!! Smile
    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 ! Cool
     
    Posts: 356 | Location: Ningbo, China | Registered: April 15, 2006Reply With QuoteEdit or Delete MessageReport This Post
    VM Staff
    Picture of Derry
    Posted Hide Post
    A 'JavaScript' library might be a good idea Smile. But then, whenever you create a JavaScript function, someone wants to alter it in some way ("my text should scroll left, not right"). Eek

    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... Wink


    - Derry
     
    Posts: 4167 | Location: Toronto, Canada | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Working Mechanic
    Posted Hide Post
    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
     
    Posts: 51 | Location: Loches, France | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
    Guru 'Power' Mechanic
    Picture of Bruceee
    Posted Hide Post
    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.
     
    Posts: 9258 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Working Mechanic
    Posted Hide Post
    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>
     
    Posts: 51 | Location: Loches, France | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
    Working Mechanic
    Posted Hide Post
    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???????
     
    Posts: 51 | Location: Loches, France | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
    Guru 'Power' Mechanic
    Picture of Bruceee
    Posted Hide Post
    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.
     
    Posts: 9258 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Working Mechanic
    Posted Hide Post
    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!
     
    Posts: 51 | Location: Loches, France | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
      Powered by Eve Community  
     


    ™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.