popup-window with "anchor" node and javascript 
Author Message
 popup-window with "anchor" node and javascript

Hi again,

I recieved some hints, but they don`t work so I decided to send you the
code:

First with "anchor" node:

1  Anchor {
2   children [
3    Shape {
4     geometry Sphere { }
5    }
6   ]
7   url "Links.htm"
8   description "Links"
9   parameter ["target=newpage","height=300","width=300"]
10  }

 The browser ignores the "height" and the width" parameter. In the
 vrml-spec I couldn`t find much about the "parameter" tag.

 Second I tried Javascript:

 1 Transform {
 2 translation 1 0 -3
 3 children [
 4  DEF ts TouchSensor {
 5   enabled TRUE
 6   }
 7  Shape{
 8   geometry Box { size 2 2 2}
 9   }
 10  DEF popup Script {
 11   eventIn SFBool isOver
 12   eventOut SFBool out
 13   url [ "javascript:
 14    function isOver(value) {
 15     if (value) isOver = true
 16     open('Links.htm','Fenster','height=300, width=300')
 17     }
 18    "
 19   ]
 20  }
 21 ]
 22 }
 23 ROUTE ts.isOver TO popup.isOver

 Here I recieve a runtime error and CP says, "open" in line 16 is not
 defined.

I`m using NT4.0/NN4.05/CP2.0  .

Each hint is welcome!!!
thanx in advance

Arne



Fri, 26 Apr 2002 03:00:00 GMT  
 popup-window with "anchor" node and javascript
Arne Berger schrieb:
Quote:

> Hi again,
[snipp]
> Each hint is welcome!!!

Why don't you just  add an
onLoad="javascript:self.window.resizeTo(x,y);" to your Body tag ...
should work fine ...

Cu Eike



Fri, 26 Apr 2002 03:00:00 GMT  
 popup-window with "anchor" node and javascript
Hi,

Quote:
> onLoad="javascript:self.window.resizeTo(x,y);" to your Body tag ...

                                        ^^^^^^^
self.window do not exist cause "self" points to the window where the
document is...

just do self.resizeTo(x,y)

Bye



Fri, 26 Apr 2002 03:00:00 GMT  
 popup-window with "anchor" node and javascript

Hi

A way is to use an

javascript: url
somthing like

Anchor {
    url "javascript:myopenwin()"

Quote:
}

and you put the openwin script in the HTML page embedding the VRML.

-- Holger

----------------------------------------------------------------------

blaxxun interactive  http://www.blaxxun.com


Quote:
> Hi again,

> I recieved some hints, but they don`t work so I decided to send you the
> code:

> First with "anchor" node:

> 1  Anchor {
> 2   children [
> 3    Shape {
> 4     geometry Sphere { }
> 5    }
> 6   ]
> 7   url "Links.htm"
> 8   description "Links"
> 9   parameter ["target=newpage","height=300","width=300"]
> 10  }

>  The browser ignores the "height" and the width" parameter. In the
>  vrml-spec I couldn`t find much about the "parameter" tag.

>  Second I tried Javascript:

>  1 Transform {
>  2 translation 1 0 -3
>  3 children [
>  4  DEF ts TouchSensor {
>  5   enabled TRUE
>  6   }
>  7  Shape{
>  8   geometry Box { size 2 2 2}
>  9   }
>  10  DEF popup Script {
>  11   eventIn SFBool isOver
>  12   eventOut SFBool out
>  13   url [ "javascript:
>  14    function isOver(value) {
>  15     if (value) isOver = true
>  16     open('Links.htm','Fenster','height=300, width=300')
>  17     }
>  18    "
>  19   ]
>  20  }
>  21 ]
>  22 }
>  23 ROUTE ts.isOver TO popup.isOver

>  Here I recieve a runtime error and CP says, "open" in line 16 is not
>  defined.

> I`m using NT4.0/NN4.05/CP2.0  .

> Each hint is welcome!!!
> thanx in advance

> Arne



Sat, 27 Apr 2002 03:00:00 GMT  
 popup-window with "anchor" node and javascript
hi
what the blaxxun guy mentioned you can see there...i have sent this that
often that i think it should be added to some faq...
greetings
mehdi
Quote:
----- Original Message -----


Sent: Friday, July 16, 1999 5:11 PM
Subject: Re: How can I open a new window?

.until you have gotten better answers you could have a look
> at what i did just a few days ago...
> http://www2.ifib.uni-karlsruhe.de/studis/vircam/grau/start.htm
> i just used frames and JavaScript
> the wrl is embedded in a frame of a html page
> the wrl anchor (url + target) object opens a page containing nothing but
> that:
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>loadall</title>
> </head>
> <body onLoad="loader();" bgcolor="#000000">
> </body>
> <script language="JavaScript"><!--
> function loader(){
>         campus = window.open("wrlinhtm.htm", "wrlinhtm",

"width=520,height=180,screenX=0,screenY=0,resizable=yes,toolbar=no,status=no
> ,navigationbar=no,scrolling=no");
> }
> // --></script>

> </html>
> in a second frame on start.htm..
> and in wrlinhtm.htm the new wrl is embedded...voila
> its not high end coding and quite confusing when having lots of files
> ....but...... it opens a window without toolbarjunk from wrl
> i d be happy too if someone had a  less-file-count-blowingup-anwser
> so let me participate on that straight-solution-to-come when you got it...
> greetings
> m



Sat, 27 Apr 2002 03:00:00 GMT  
 popup-window with "anchor" node and javascript
Apach schrieb:

Quote:

> Hi,

> > onLoad="javascript:self.window.resizeTo(x,y);" to your Body tag ...
>                                         ^^^^^^^
> self.window do not exist cause "self" points to the window where the
> document is...

> just do self.resizeTo(x,y)

> Bye

Yepp ... You're right ... Sorry, but it was Monday ;o)


Sat, 27 Apr 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. popup window with "anchor" node

2. Problem with Anchor + parameter [ "target=page" ]

3. entry input "anchor".

4. "Popup menus"

5. How to do textual info "popup"?

6. url "javascript:..." does not work

7. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

8. "Square" function in formula node

9. Transform Node's "center" field

10. Script node: parse error: line 6 "}"

11. "For" loop node assignments

12. Anchor node and embedded window

 

 
Powered by phpBB® Forum Software