<div dir="ltr"><div><div><div>Hi Mariano.<br><br></div>I guess that this info can help you:<br><a href="http://forum.world.st/Incorrect-position-en-JQDialog-td4399806.html">http://forum.world.st/Incorrect-position-en-JQDialog-td4399806.html</a><br>

<br></div>I have a webapp in that I made an WADecoration subclass to render a JQDialog around the decorated WAComponent, and I hold in this all JQDialog information, like position and size. I share in as soon I have time to find this image :)<br>

<br></div>Best.<br><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-15 19:08 GMT-03:00 Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi guys,<div><br></div><div>I am currently creating a JQDialog. Such an object allows one to define a &#39;width&#39;. But it can only be passed a number (pixels). In my case I want a special default..say $(window).width() * 0.9</div>


<div><br></div><div>I tried many ways of dealing with that and I failed completly. The way I create the script is this:</div><div><br></div><div>scriptToOpenDialogOn: html value: value <br></div><div><br></div><div><div>

((html jQuery: &#39;#popupContainer&#39;) dialog close),</div>
<div><span style="white-space:pre-wrap">                </span>((html jQuery: &#39;#popupContainer&#39;) dialog</div><div><span style="white-space:pre-wrap">                                        </span>title: value second;</div><div><span style="white-space:pre-wrap">                                        </span>html: value first;</div>


<div><span style="white-space:pre-wrap">                                        </span>modal: false;</div><div><span style="white-space:pre-wrap">                                        </span>autoOpen: true;</div><div><span style="white-space:pre-wrap">                                        </span>draggable: true;</div>
<div><span style="white-space:pre-wrap">                                        </span>resizable: false;</div><div><span style="white-space:pre-wrap">                                        </span>position: &#39;top&#39;;</div><div><span style="white-space:pre-wrap">                                        </span>closeOnEscape: true;</div>


<div><span style="white-space:pre-wrap">                                        </span>width: 900;</div><div><span style="white-space:pre-wrap">                                        </span>addButton: &#39;Close&#39; do: (html jQuery: &#39;#popupContainer&#39;) dialog close)</div><div>
<span style="white-space:pre-wrap">                                        </span></div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">And that is appended to #script: of an ajax callback:</span></div>
<div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">scriptForPopupClickHandlerOn: html

        | val |
        val := ValueHolder new.
        ^ html jQuery this
                on: &#39;click&#39;
                selector: &#39;.clickablePopup&#39;
                do: ((html jQuery ajax 
                                callback: [:pass | val contents: pass first ]
                                passengers: (html jQuery this);
                                script: [ :s |  
                                        s &lt;&lt; (self scriptToOpenDialogOn: s value: val contents) ]) asFunction: #(event))
                                                                </span></div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Any ideas how could i make those 900 pixels to be a % of say..the width of the root document?</span></div>


<div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Thanks in advance,</span></div><span class="HOEnZb"><font color="#888888"><div><span style="white-space:pre-wrap"><br></span></div>

<div><br></div>-- <br>Mariano<br>
<a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
</font></span></div></div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>