there is an add-ons for that WindowStore (in file window_ext.js) You  
need to download the latest version from this morning!!
There is a sample in the distrib (samples/window_store.html) and also  
visible online: http://prototype-window.xilinus.com/current/samples/ 
window_store.html

Seb

On Feb 26, 2007, at 10:52 PM, Jimmy On wrote:

>
> Hope someone has a better idea how to do this. On page load, the  
> page is empty and with a link to opens up a new window. How would I  
> store it to the cookie if the window has been opened already. So  
> the next time around the window shows up without clicking the link.  
> But if I close the window, it will clear the cookie, which I must  
> click again to show the window. Heres my code...plus im using  
> jquery hand in hand with this.
>
> $j = jQuery.noConflict();
>
>     $j(function() {
>
>         var cookie = $j.cookie('style');
>
>         if (cookie) {
>             OpenSearchWidget(cookie);
>         }
>
>         $j('#openSearch').click(function() {
>             OpenSearchWidget('google');
>         });
>     });
>
>
> var searchWin = null;
>
>     function OpenSearchWidget(engine) {
>
>         $j.cookie('style', engine);
>
>         if (!searchWin) {
>             searchWin = new Window('search',{className: "custom",  
> width:270,height:20,resizable: false, showProgress: true,  
> hideEffect: Element.hide, showEffect:Element.show,  
> showEffectOptions: {duration:3}})
>
>         } else {
>
>             searchWin.setContent('ph');
>             searchWin.setCookie(searchWin);
>             searchWin.toFront();
>             searchWin.setConstraint(true, {left:10, right:10, top:  
> 50, bottom:10});
>             searchWin.show();
>
>
>             });
>         }
>     }
>
> _______________________________________________
> Javawin mailing list
> [email protected]
> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com


_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to