Stump the Panel Topic: Resize the lookup field http://www.endusersharepoint.com/STP/ SharePoint QA en Sun, 31 May 2009 01:30:06 +0000 AutoSponge on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3371 Mon, 12 Jan 2009 13:56:52 +0000 AutoSponge 3371@http://www.endusersharepoint.com/STP/ <p>Yes. There are several ways to move content. CSS positioning is probably the easiest/least intrusive. </p> jaxkookie on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3365 Mon, 12 Jan 2009 11:31:21 +0000 jaxkookie 3365@http://www.endusersharepoint.com/STP/ <p>BINGO! you are da man! That was exactly what I was looking for. Thank you for all your time and effort.</p> <p>I have a related question. I do not need you post the answer if it can be done. I would like to try and figure it out. With this field, of course now that it is resized it takes up much horizontal real estate. can this field be re position top to bottom instead of left to right? </p> AutoSponge on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3324 Sat, 10 Jan 2009 13:28:01 +0000 AutoSponge 3324@http://www.endusersharepoint.com/STP/ <p>I see (in the code) what you're talking about. </p> <p>In jQuery, we can target the parent node (the div in this case) by using .parent() [http://docs.jquery.com/Traversing/parent#expr]; then sending some more css instructions. I don't have your page to test with but see how far you get with this:</p> <pre><code>&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(function() { $(&quot;[title^=&#39;lookup&#39;]&quot;).width(&quot;300px&quot;) .parent() .css({width:&#39;300px&#39;,height:&#39;300px&#39;,overflow:&#39;hidden&#39;}); }); &lt;/script&gt;</code></pre> <p>Set those height, width and overflow to whatever you want. </p> jaxkookie on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3314 Fri, 09 Jan 2009 10:06:22 +0000 jaxkookie 3314@http://www.endusersharepoint.com/STP/ <p>I really appreciate your help on this, but it is still unsuccessful. The issue is not with resizing the field because I was able to see the size of that change. What is not changing is the surrounding scrolling area. I think because the div scroll is set to overflow with a specified height and width. that area doesn't change. Visually at first glance it does not appear to resize. I am trying to remove the scroll bars and resize the div area. This is were I am failing. Your script resizes the fields but the defined div area still cuts it off from view. </p> AutoSponge on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3312 Fri, 09 Jan 2009 08:52:28 +0000 AutoSponge 3312@http://www.endusersharepoint.com/STP/ <p>Try this. It changes one character in the "selector":</p> <pre><code>&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(function() { $(&quot;[title^=&#39;lookup&#39;]&quot;).width(&quot;300px&quot;) }); &lt;/script&gt;</code></pre> <p>Remember to change the title='' to your title name. The ^ before the = means "starts with" so you can get both 'lookup possible...' and 'lookup selected...' with the selector. </p> jaxkookie on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3307 Thu, 08 Jan 2009 19:03:41 +0000 jaxkookie 3307@http://www.endusersharepoint.com/STP/ <p>I tried the code you posted above. When I viewed the page source I found that multiple select had 2 fields<br /> title="lookup possible values" and title="lookup selected values"</p> <p>I tried these and no success. looking at the page source I can see these select fields are nested between div's for the multiple select lookup field</p> <p>This is the page source:<br /> <pre><code>&lt;TR&gt; &lt;TD nowrap=&quot;true&quot; valign=&quot;top&quot; width=&quot;190px&quot; class=&quot;ms-formlabel&quot;&gt;&lt;H3 class=&quot;ms-standardheader&quot;&gt; &lt;nobr&gt;lookup&lt;/nobr&gt; &lt;/H3&gt;&lt;/TD&gt; &lt;TD valign=&quot;top&quot; class=&quot;ms-formbody&quot; width=&quot;400px&quot;&gt; &lt;!-- FieldName=&quot;lookup&quot; FieldInternalName=&quot;lookup&quot; FieldType=&quot;SPFieldLookupMulti&quot; --&gt; &lt;span dir=&quot;none&quot;&gt; &lt;input id=&quot;ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker&quot; name=&quot;ctl00$m$g_a661a08d_6b25_4bd3_af5f_f84d4368977b$ctl00$ctl04$ctl05$ctl00$ctl00$ctl04$ctl00$ctl00$MultiLookupPicker&quot; type=&quot;hidden&quot; value&gt;&lt;/input&gt;&lt;input id=&quot;ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_data&quot; name=&quot;ctl00$m$g_a661a08d_6b25_4bd3_af5f_f84d4368977b$ctl00$ctl04$ctl05$ctl00$ctl00$ctl04$ctl00$ctl00$MultiLookupPicker$data&quot; type=&quot;hidden&quot; value=&quot;Values Removed for space&quot;&gt;&lt;/input&gt;&lt;input id=&quot;ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_initial&quot; name=&quot;ctl00$m$g_a661a08d_6b25_4bd3_af5f_f84d4368977b$ctl00$ctl04$ctl05$ctl00$ctl00$ctl04$ctl00$ctl00$MultiLookupPicker$initial&quot; type=&quot;hidden&quot; value=&quot;&quot;&gt;&lt;/input&gt; &lt;table class=&quot;ms-long&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot;&gt; &lt;tr&gt; &lt;td class=&quot;ms-input&quot;&gt; &lt;div style=&#39;width:143px;height:125px;overflow:scroll&#39;&gt;&lt;select name=&quot;ctl00$m$g_a661a08d_6b25_4bd3_af5f_f84d4368977b$ctl00$ctl04$ctl05$ctl00$ctl00$ctl04$ctl00$ctl00$SelectCandidate&quot; id=&quot;ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_SelectCandidate&quot; multiple=&quot;multiple&quot; title=&quot;lookup possible values&quot; onchange=&quot;GipSelectCandidateItems(ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m);&quot; ondblclick=&quot;GipAddSelectedItems(ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m); return false&quot; onKeyDown=&quot;GipHandleHScroll(event)&quot;&gt; &lt;/select&gt;&lt;/div&gt; &lt;/td&gt; &lt;td style=&quot;padding-left:10px&quot;&gt; &lt;td align=&quot;center&quot; valign=&quot;middle&quot; class=&quot;ms-input&quot;&gt;&lt;button id=&quot;ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_AddButton&quot; class=&quot;ms-buttonheightwidth&quot; onclick=&quot;GipAddSelectedItems(ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m); return false&quot;&gt; Add &gt; &lt;/button&gt;&lt;br /&gt; &lt;br /&gt;&lt;button id=&quot;ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_RemoveButton&quot; class=&quot;ms-buttonheightwidth&quot; onclick=&quot;GipRemoveSelectedItems(ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m); return false&quot;&gt; &lt; Remove &lt;/button&gt; &lt;/td&gt; &lt;td style=&quot;padding-left:10px&quot;&gt; &lt;td class=&quot;ms-input&quot;&gt; &lt;div style=&#39;width:143px;height:125px;overflow:scroll&#39;&gt;&lt;select name=&quot;ctl00$m$g_a661a08d_6b25_4bd3_af5f_f84d4368977b$ctl00$ctl04$ctl05$ctl00$ctl00$ctl04$ctl00$ctl00$SelectResult&quot; id=&quot;ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_SelectResult&quot; multiple=&quot;multiple&quot; title=&quot;lookup selected values&quot; onchange=&quot;GipSelectResultItems(ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m);&quot; ondblclick=&quot;GipRemoveSelectedItems(ctl00_m_g_a661a08d_6b25_4bd3_af5f_f84d4368977b_ctl00_ctl04_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m); return false&quot; onKeyDown=&quot;GipHandleHScroll(event)&quot;&gt; &lt;/select&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/span&gt; &lt;/TD&gt; &lt;/TR&gt;</code></pre> AutoSponge on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3301 Thu, 08 Jan 2009 17:34:17 +0000 AutoSponge 3301@http://www.endusersharepoint.com/STP/ <p>Can you paste a sample of that HTML? Use the ` marks at the beginning and end so the server doesn't erase your code. </p> jaxkookie on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3292 Thu, 08 Jan 2009 14:37:04 +0000 jaxkookie 3292@http://www.endusersharepoint.com/STP/ <p>this works great for just a lookup field or any text/choice field, but when the look up is set to multiple select it displays two list option fields, one to select and one to populate with selection. That is the part I am trying to resize or reorganize. </p> <p>when I view the page source it looks as if the possible values and selected values are nested in a div with a set height and width and overflow:scroll.</p> <p>Any ideas or help? </p> AutoSponge on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3212 Fri, 02 Jan 2009 22:23:17 +0000 AutoSponge 3212@http://www.endusersharepoint.com/STP/ <p>If you've followed any of my JavaScript articles recently, you know I'm a big fan of jQuery. Here's a quick example of what you can do with it to fix those "little problems."</p> <pre><code>&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(function() { $(&quot;[title=&#39;TestLookUp&#39;]&quot;).width(&quot;300px&quot;) }); &lt;/script&gt;</code></pre> jaxkookie on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3208 Fri, 02 Jan 2009 16:16:30 +0000 jaxkookie 3208@http://www.endusersharepoint.com/STP/ <p>it is n ot a feature that needs to be dynamic. I have found on many occasions the items of the multiple select lookup are too long to view. once i have the items added i can set this value to display for better viewing. </p> AutoSponge on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3111 Sun, 21 Dec 2008 17:02:24 +0000 AutoSponge 3111@http://www.endusersharepoint.com/STP/ <p>How often do you need this functionality? </p> jaxkookie on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3109 Sun, 21 Dec 2008 16:27:33 +0000 jaxkookie 3109@http://www.endusersharepoint.com/STP/ <p>The look up field with multiple select. </p> jaxkookie on "Resize the lookup field" http://www.endusersharepoint.com/STP/topic/resize-the-lookup-field#post-3108 Sun, 21 Dec 2008 16:26:38 +0000 jaxkookie 3108@http://www.endusersharepoint.com/STP/ <p>I have seen many webparts that hide, disable fields/columns on a WSS intake. Is there a way to manage the display size of a lookup field? (height and width) </p>