PDA

View Full Version : [Solved] Viewport / Window hide issues



CoolGoose
14 May 2009, 4:15 AM
Hi guys. I'm trying to do the following:
Present a login window for the user and after the user provided the correct user + password combination i want to display a panel with some content.

The trick is that if i use hide() to hide the viewport with the panel the window gets hidden as well (even if it's not in the viewport). I assume that it's because of the fact that the viewport it attaches itself to the body.

Here's the code. (http://pastebin.ca/1422572)

Can you give me any tips ? Thanks

Animal
14 May 2009, 4:53 AM
Hide the Viewport? The Viewport is the HTML body.

You could mask it by specifying that the Window is modal.

CoolGoose
14 May 2009, 4:58 AM
Thanks for the tip.
My only concern is security related. If somebody uses firebug he could just hide the modal window and see what's below.
But i could just leave the viewport empty and add the extra data after the login window gets closed.
That should work right ?

Animal
14 May 2009, 5:06 AM
OK, that's a different thing from hiding. You could just not create the Viewport until they log in.

CoolGoose
14 May 2009, 5:11 AM
Ok I've moved the viewport creation after the success method of the login window.
It seems to do the trick nicely.

Thanks again for your help ;).