Comments on: JQuery for Everyone: Manually Resizing Web Parts http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/ No GeekSpeak on SharePoint 2007 WSS and MOSS Mon, 27 Dec 2010 14:28:49 -0500 http://wordpress.org/?v=2.8.6 hourly 1 By: Aparna http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-71431 Aparna Mon, 31 May 2010 05:16:42 +0000 http://www.endusersharepoint.com/?p=1116#comment-71431 Hi Paul, Great code !! I used your code for Excel web part and it works perfectly. I have been trying during our last product release to fit SSRS webparts to their content. BUT I always ended with vertical and horizontal scrollbars. I tried many scripts, getting the ReportFrame Div tag and adjusting the height etc, setting the AsyncRendering false, SizeFitToContent true... ...etc . But am ending up with those bad-fitting scrollbars for my SSRS webpart. Please, please, say "Yes", but with little tweaks to your code for excel web access, can I USE it for SSRS webpart resizing ? Thank so much for all your hardwork. It helps people like me a lot. Aparna Hi Paul,

Great code !! I used your code for Excel web part and it works perfectly. I have been trying during our last product release to fit SSRS webparts to their content. BUT I always ended with vertical and horizontal scrollbars. I tried many scripts, getting the ReportFrame Div tag and adjusting the height etc, setting the AsyncRendering false, SizeFitToContent true… …etc .

But am ending up with those bad-fitting scrollbars for my SSRS webpart.

Please, please, say “Yes”, but with little tweaks to your code for excel web access, can I USE it for SSRS webpart resizing ?

Thank so much for all your hardwork. It helps people like me a lot.
Aparna

]]>
By: jQuery for Everyone | Halwsa.Net http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-31728 jQuery for Everyone | Halwsa.Net Fri, 12 Feb 2010 14:26:47 +0000 http://www.endusersharepoint.com/?p=1116#comment-31728 [...] JQuery for Everyone: Manually Resizing Web Parts [...] [...] JQuery for Everyone: Manually Resizing Web Parts [...]

]]>
By: Sue http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-23069 Sue Mon, 04 Jan 2010 18:56:06 +0000 http://www.endusersharepoint.com/?p=1116#comment-23069 I want to do this with the web part viewer with pages that are on my domain so I don't want it to be manual I want it to be dynamic like the Excel Web part one but I can't figure out what I need to change. I'd guess [id^='MSOZoneCell_WebPart'] needs to be changed to [id^='WebPartWPQ'] but I think also this line would need changed but I'm not sure to what...or if you can even do this. var e = $(obj).find("iframe:first").contents().find("table.ewrnav-invisibletable-nopadding:last"); since this appears to be looking for the excel table and I'd just want to look I think for the DIV tag. Not sure, can I dynamically eliminate both horizontal and vertical scroll bars on the iFrame for the Web Part viewer so it always resizes to the page content? I want to do this with the web part viewer with pages that are on my domain so I don’t want it to be manual I want it to be dynamic like the Excel Web part one but I can’t figure out what I need to change. I’d guess [id^='MSOZoneCell_WebPart'] needs to be changed to [id^='WebPartWPQ'] but I think also this line would need changed but I’m not sure to what…or if you can even do this.

var e = $(obj).find(”iframe:first”).contents().find(”table.ewrnav-invisibletable-nopadding:last”); since this appears to be looking for the excel table and I’d just want to look I think for the DIV tag. Not sure, can I dynamically eliminate both horizontal and vertical scroll bars on the iFrame for the Web Part viewer so it always resizes to the page content?

]]>
By: Alex http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-18097 Alex Sat, 17 Oct 2009 08:30:42 +0000 http://www.endusersharepoint.com/?p=1116#comment-18097 Hi Paul! You have done an impressive work! Great post! Could you please tell me, how can I resize my viewer web part dynamically? From my own security domain. Cheers, A Hi Paul!

You have done an impressive work! Great post! Could you please tell me, how can I resize my viewer web part dynamically? From my own security domain.

Cheers,

A

]]>
By: jdub http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-16354 jdub Tue, 25 Aug 2009 03:35:13 +0000 http://www.endusersharepoint.com/?p=1116#comment-16354 hi, this is great, i have a problem, when i edit my page the whole page shrink, do you have a solution here? thanks a lot hi,

this is great,

i have a problem, when i edit my page the whole page shrink, do you have a solution here? thanks a lot

]]>
By: Jason http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-16028 Jason Thu, 13 Aug 2009 19:31:07 +0000 http://www.endusersharepoint.com/?p=1116#comment-16028 I am trying to do something along these same lines. Basically, I have an .aspx page in SharePoint with a single web part zone. Currently, the web part always has a fixed width and height (1000px by 510px). Ideally, I would like the web part to dynamically expand/shrink as the page size changes. I tried setting the "Width" and "Height" web part properties in (managed) code, but it gave me an error message to the affect that only fixed width and height is allowed. Is there a way to set it dynamically using jQuery (or any other technology, for that matter)? I am trying to do something along these same lines.

Basically, I have an .aspx page in SharePoint with a single web part zone. Currently, the web part always has a fixed width and height (1000px by 510px).

Ideally, I would like the web part to dynamically expand/shrink as the page size changes. I tried setting the “Width” and “Height” web part properties in (managed) code, but it gave me an error message to the affect that only fixed width and height is allowed. Is there a way to set it dynamically using jQuery (or any other technology, for that matter)?

]]>
By: AutoSponge http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-15267 AutoSponge Sat, 25 Jul 2009 01:41:58 +0000 http://www.endusersharepoint.com/?p=1116#comment-15267 @Jim, The changes above are made to the "inline style" of the element. You should be able to look at the element in Firebug and see the changes. If you don't see them, something isn't firing. Make sure you have this script inside a document.ready closure: <pre lang="javascript"> $(function(){ //code goes here }); </pre> The DOM must be loaded and ready before it can manipulate these elements. If you still don't see the changes, try running variations of the code in the Firebug console until you see something firing. Troubleshooting scripts is by no means the most fun you can have on a Saturday night, but you will learn a lot from the process. @Jim,

The changes above are made to the “inline style” of the element. You should be able to look at the element in Firebug and see the changes. If you don’t see them, something isn’t firing.

Make sure you have this script inside a document.ready closure:

$(function(){
  //code goes here
});

The DOM must be loaded and ready before it can manipulate these elements. If you still don’t see the changes, try running variations of the code in the Firebug console until you see something firing.

Troubleshooting scripts is by no means the most fun you can have on a Saturday night, but you will learn a lot from the process.

]]>
By: Jim Andrew http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-15147 Jim Andrew Wed, 22 Jul 2009 20:05:05 +0000 http://www.endusersharepoint.com/?p=1116#comment-15147 @AutoSponge To start with thanks for your help Paul! I have been using your methods over the last few months and they have worked great! I have a CEWP on the page already that I am using for some other jQuery stuff so I know that the reference works. I also changed the WPQ#'s for each of the items in your jQuery code to match my webparts. No luck. Am I missing something? The web parts are still stacked vertically and have not moved. Thanks, Jim @AutoSponge

To start with thanks for your help Paul! I have been using your methods over the last few months and they have worked great!

I have a CEWP on the page already that I am using for some other jQuery stuff so I know that the reference works.

I also changed the WPQ#’s for each of the items in your jQuery code to match my webparts. No luck.

Am I missing something? The web parts are still stacked vertically and have not moved.

Thanks,
Jim

]]>
By: AutoSponge http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-15081 AutoSponge Tue, 21 Jul 2009 20:18:20 +0000 http://www.endusersharepoint.com/?p=1116#comment-15081 @Jim, It's not similar, but I have an option anyway :P If you know how to add some JavaScript and you're following this series, start the same way: use a hidden CEWP with two script tags, the first has a link to jQuery and the second has this code: <pre lang="javascript"> var w = window.innerWidth; $("#MSOZoneCell_WebPartWPQ1").css({position:"absolute", left:"160px", width:w/4}); $("#MSOZoneCell_WebPartWPQ2").css({position:"absolute", left:160+w/4+25, width:w/4}); $("#MSOZoneCell_WebPartWPQ3").css({position:"absolute", left:160+w/2+50, width:w/4}); </pre> Change the web part ID's to match the ones you want to layout and where. Good luck, Paul @Jim,

It’s not similar, but I have an option anyway :P

If you know how to add some JavaScript and you’re following this series, start the same way: use a hidden CEWP with two script tags, the first has a link to jQuery and the second has this code:

var w = window.innerWidth;
$("#MSOZoneCell_WebPartWPQ1").css({position:"absolute", left:"160px", width:w/4});
$("#MSOZoneCell_WebPartWPQ2").css({position:"absolute", left:160+w/4+25, width:w/4});
$("#MSOZoneCell_WebPartWPQ3").css({position:"absolute", left:160+w/2+50, width:w/4});

Change the web part ID’s to match the ones you want to layout and where.

Good luck,
Paul

]]>
By: Jim Andrew http://www.endusersharepoint.com/2009/01/05/jquery-for-everyone-manually-resizing-web-parts/comment-page-1/#comment-15068 Jim Andrew Tue, 21 Jul 2009 17:03:05 +0000 http://www.endusersharepoint.com/?p=1116#comment-15068 Okay this is similar to what I am trying to do. I am hoping that I can get some help with the issue that I am having. I am trying to make 3 web parts that are in a vertically aligned zone display next to each other in a 3 column layout. I do not have control over the page layout to be able to modify from the server side. I need to be able to do this from the client side if possible. Okay this is similar to what I am trying to do. I am hoping that I can get some help with the issue that I am having.

I am trying to make 3 web parts that are in a vertically aligned zone display next to each other in a 3 column layout. I do not have control over the page layout to be able to modify from the server side.

I need to be able to do this from the client side if possible.

]]>