cancel
Showing results for 
Search instead for 
Did you mean: 

Need to capture when the screen has been re-sized?

Former Member
0 Kudos

I need to (perhaps) force a server round-trip whenever the screen has been resized. I have a multiple screens under a tab control. If I manually re-size a screen I can only then get the contents to stretch to full screen if I click on another tab button and then back again.

I would like to detect the screen re-size and then have the screen re-displayed, which I think will happen if I force a server round-trip.

Has anyone done anything like this before.

John Sapora

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Just wanted to chase this up. Surely someone has done this before?.

Former Member
0 Kudos

Another plea.

Has anyone ever detected when the screen has been manually changed in size?.

I need to do this and force a round-server trip so that the screen is then displayed okay.

I have read something about using some kind of SAP time variable as the name of my Tag within my BSP code, but I think this might need to be explained in more detail.

John

Former Member
0 Kudos

Hi Jon,

I am not sure if this is possible using any BSP tags or in code.

You can try writing javascript in your htm page to check if it works - there are events in javascript to check window size and other options and you can add javascript in your bsp view htm page.

Something like:


window . on resize = function ( ) {
//your code
}

OR


< BODY on Resize = "a lert ( 'Thank you for resizing' )" >

You can try searching a bit more on the same lines. Please let us know if got it to work.

Thanks,

Rohit

Former Member
0 Kudos

You might be right about it not being easily possible in BSP, but there are a tonne of Methods within the Controller class and I'm currently looking through these to see if any are applicable. I can trigger a server-round trip from one of these methods, assuming such a method is triggered when the screen is re-sized.

I would have thought this a common problem though within the browser, what with re-sizing being an essential part of the browser functionality. Very strange that's it so difficult to find a solution.

Thanks for you advice thus far though, and I suspect your Javascript suggestion might work, but is my fall-back solution...

John Sapora