NoPost and goSize (or goResize)

Hi all,
I’m using a GoView in a page with NoPost=true, and all my actions are done through javascript.
I have 2 buttons for sizing (one for maximize the other for minimize) the GoView with javascript.
When I call the minimize button (goSize(100,100,‘MyView’) for example), the image received has a new “exploitable” size as specified in the top left corner but the image still keeps the original size (500,500 for example) -> there is a big margin (400,400) around the exploitable image.
If I try to reduce the img.width & height with js, the image still keeps the exploitable portion and this kind of margin.
It seems the image streamed in the response of the img.src is not resized as it should be…
Has anybody a solution or a workaround ?

Yes, in NoPost mode, you need to have the JavaScript also set the width and/or height of the element. (You don’t have to when the whole page is (re-)loaded because the element will have the appropriate width and height attributes in the rendered HTML.)
The goSize function (actually implemented by GoView.RaisePostBackEvent on the server) does have a minimum size of 30x30.
Here’s what some of the web examples, such as Classier and FamilyTree, will use in the next release:
. . .



. . .

I’m not sure there’s a good way in JavaScript to find out the size of the client area of the browser window that will work in most browsers. If you have any suggestions, I’d like to hear them.

In fact the problem is not with the maximize function but with the minimize which produces a bad image.
I send you a picture of what I’m getting after reducing the size of the goview.

Are you doing something like this?
Expand View
Absolute Size

function SizeView() {
goSize(100, 100, ‘MyView’);
var img = document.getElementById(‘MyView’);
if (img.goNoPost) {
img.width = 100;
img.height = 100;
}
}
function ExpandView() {
goResize(10, 20, ‘MyView’);
var img = document.getElementById(‘MyView’);
if (img.goNoPost) {
img.width += 10;
img.height += 20;
}
}

Yes, it’s the same kind of code.
I’ve tried your code in Basic App and I still have the problem.
It occurs when I reduce the size of the original image.

It turns out that this is a bug that happens in certain conditions. It will be fixed for the next release.