Using Javascript MouseOver??? 
Author Message
 Using Javascript MouseOver???

Hello,
      I'm just learning vrml and JavaScript and am attempting to use a simple cube as a touchsensor point.  Currently I've created an anchor node and in the url field
I've used JavaScript to generate another small  window.  What I really need is to be able to simply place the mouse over the cube and have the widow popup...when
the mouse leaves the cube the extra window would close automatically.  If anyone has any links to examples or can help I would appreciate it.

     Would it be possibly to have the mouseover type function and the anchor (requiring a click) type function at the same time?

Thanks for any help.

Michael G.



Fri, 10 May 2002 03:00:00 GMT  
 Using Javascript MouseOver???
you should use the isOver eventOut from the TouchSensor

something like

DEF touch TouchSensor{}

DEF js Script{

 eventIn SFBool touch

 url "javascript:
  function touch(value){
   if(value) {
     open the window
   }
   else{
    close the window
   }
  }
 "

Quote:
}

ROUTE touch.isOver TO js.touch



Quote:
> Hello,
>       I'm just learning VRML and JavaScript and am attempting to use a

simple cube as a touchsensor point.  Currently I've created an anchor node
and in the url field
Quote:
> I've used JavaScript to generate another small  window.  What I really

need is to be able to simply place the mouse over the cube and have the
widow popup...when
Quote:
> the mouse leaves the cube the extra window would close automatically.  If

anyone has any links to examples or can help I would appreciate it.
Quote:

>      Would it be possibly to have the mouseover type function and the

anchor (requiring a click) type function at the same time?
Quote:

> Thanks for any help.

> Michael G.



Fri, 10 May 2002 03:00:00 GMT  
 Using Javascript MouseOver???
I've use this snippet of code for a VRML anchor to spawn a window (at least the 2nd function line)....but in this isOver usage I'm getting a window not named error

any suggestions?

DEF touch TouchSensor {}
        DEF js Script {
                eventIn SFBool touch
                url"javascript:
                  function touch(value){
                    if(value){
                      function popup(){window.open('file://localhost/C:/MichaelG/Demo3/PlaneData.htm','newpage','width=800,height=1200');};popup();
                    }
                    else{
                        window.close()
                    }
                 }
                "
        }        


Quote:
> you should use the isOver eventOut from the TouchSensor

> something like

> DEF touch TouchSensor{}

> DEF js Script{

>  eventIn SFBool touch

>  url "javascript:
>   function touch(value){
>    if(value) {
>      open the window
>    }
>    else{
>     close the window
>    }
>   }
>  "
> }

> ROUTE touch.isOver TO js.touch



> > Hello,
> >       I'm just learning VRML and JavaScript and am attempting to use a
> simple cube as a touchsensor point.  Currently I've created an anchor node
> and in the url field
> > I've used JavaScript to generate another small  window.  What I really
> need is to be able to simply place the mouse over the cube and have the
> widow popup...when
> > the mouse leaves the cube the extra window would close automatically.  If
> anyone has any links to examples or can help I would appreciate it.

> >      Would it be possibly to have the mouseover type function and the
> anchor (requiring a click) type function at the same time?

> > Thanks for any help.

> > Michael G.



Sat, 11 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IE6 +VRML + javascript in VRML trouble (was: problem using javascript window.open in VRML)

2. how to retrieve the size of geometry using javascript

3. change object color using Javascript, HELP!

4. VRML Automation using Javascript

5. problem using javascript window.open in VRML

6. Using optcl and javascript

7. newbie: please send examples of cgi using http/html/ncgi/javascript

8. newby: Timeout error when using javascript confirm object

9. MouseOvers?

10. Yellow Mouseovers

11. Mouseover in Labview

12. On Mouseover

 

 
Powered by phpBB® Forum Software