scriptaculous and child windows

C

ChiliFingerX

I am at the end of my rope. I wrote an application, it runs locally
on my laptop, nothing to do with the Internet or client/server stuff.
Using Firefox 2.0

I open my main 'GUI.html' file. That in turn opens a local file
called 'DSK.html'. (GUI is the control panel, and DSK is the visual
window)

Here's that code

DSK = window.open("DSK.html", "DSK",
'left=0,top=0,width=720,height=480,menubar=0,toolbar=0,
alwaysRaised=0')

All my Javascript functions are in the GUI.html file. When I need to
access something on the GUI widow, I use this code

document.getElementById( 'GUI_thing' ).style.visibility="visible"

And when I need to change it in the DSK window I opened, use this code

DSK.document.getElementById( 'DSK_thing' ).style.visibility="visible"

The ID tags have GUI and DSK in them, just so I know which window's
elements I'm messing around with.

And the above works 100% fine, no problems.

Now, I wanted to do some fancy DIV effects using that 'scriptaculous'
JS library.

If I pass the ID to the effect function using
document.getElementById( 'GUI_thing' ) it works great.

However, if I use
DSK.document.getElementById( 'DSK_thing' )
or
document.getElementById( 'DSK_thing' )

I get some crazy errors.

I've tried Mootools, scriptaculous & Spry. They all give me the same
flack.

There's something missing here, and I'm just not seeing it. Puleeze
help !!
 
S

shimmyshack

I am at the end of my rope. I wrote an application, it runs locally
on my laptop, nothing to do with the Internet or client/server stuff.
Using Firefox 2.0

I open my main 'GUI.html' file. That in turn opens a local file
called 'DSK.html'. (GUI is the control panel, and DSK is the visual
window)

Here's that code

DSK = window.open("DSK.html", "DSK",
'left=0,top=0,width=720,height=480,menubar=0,toolbar=0,
alwaysRaised=0')

All my Javascript functions are in the GUI.html file. When I need to
access something on the GUI widow, I use this code

document.getElementById( 'GUI_thing' ).style.visibility="visible"

And when I need to change it in the DSK window I opened, use this code

DSK.document.getElementById( 'DSK_thing' ).style.visibility="visible"

The ID tags have GUI and DSK in them, just so I know which window's
elements I'm messing around with.

And the above works 100% fine, no problems.

Now, I wanted to do some fancy DIV effects using that 'scriptaculous'
JS library.

If I pass the ID to the effect function using
document.getElementById( 'GUI_thing' ) it works great.

However, if I use
DSK.document.getElementById( 'DSK_thing' )
or
document.getElementById( 'DSK_thing' )

I get some crazy errors.

I've tried Mootools, scriptaculous & Spry. They all give me the same
flack.

There's something missing here, and I'm just not seeing it. Puleeze
help !!

thats a reference rather than an id youre passing, so instead write a
handler function in the dsk page, pass it the things you need it to
do, let it call scriptaculous with an id.
 
C

ChiliFingerX

thats a reference rather than an id youre passing, so instead write a
handler function in the dsk page, pass it the things you need it to
do, let it call scriptaculous with an id.

Thanks for this lead, but I'm still lost.. and I'm not a newbie
either, so this is pretty frustrating.

I think I'm one step away from making this all work. I can put the
function MakeSpryHappen() in the DSK.html file, yes, no problem.
But when I call that function from the GUI.html file, it errors out
saying it can't find the function. So I put that function is a .JS
file that has other needed functions, and I get the dreaded Spry
errors again.

Need some way to link all this stuff up. Thinking maybe I need to
create all my HTML elements in a function, so in effect, there's no
DSK.html file anymore.
 
C

ChiliFingerX

On Jun 5, 3:55 am, "(e-mail address removed)" <[email protected]>
wrote:
thats a reference rather than an id youre passing, so instead write a
handler function in the dsk page, pass it the things you need it to
do, let it call scriptaculous with an id.


Found a fix, thanks for the lead.

In the DSK.html file, I have a function called Penner(). And I call
it via an onClick event in the GUI.html file as
onclick="DSK.Penner()"

and now, it knows that the Penner() function is to be found in the DSK
window.

Yayyy!! Thanks again !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top