Resize Shadowbox after loading on click

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Resize Shadowbox after loading on click

Nicolas
Hi guys,

First of all, im new to jquery and javascript in general, so please beare with me :)

Im using Shadowbox to open a registration html. On that html y have a link to a second instance registration html.

I want that second link to open in shadowbox, wich i can, but its taller, so i want shadowbox to resize when i click on the link.

I've read MANY threads regarding this, but i cant get it to work,

Here's what i got:

I call shadowbox in the original html with:

<script type="text/javascript"> Shadowbox.init({ overlayOpacity: 0.8 }); </script>
Then I target the html (idiomas.html):

In my shadowbox.js i've added these lines according to: http://victorstanciu.ro/dynamically-resizing-the-shadowbox-js-modal-window/

        k.dynamicResize = function (w, h) {
                if (!P) {
                        return
                }
                I();
                g.player.width = w;
                g.player.height = h;
                var K = g.player,
                        S = R(K.height, K.width);
                t(S.width, S.left);
                E(S.innerHeight, S.top);
                if (K.onWindowResize) {
                        K.onWindowResize()
                }
        };


THEN i dont know there to put these code: window.parent.Shadowbox.skin.dynamicResize(600, 400);

I've done something like this in the opened html (idiomas.html):

<script type='text/javascript'> window.parent.Shadowbox.skin.dynamicResize(600, 400); </script>

******************

But it doesn't work. I guess im missing the last part, where to put that last peace of code to resize it.

Any help?