Focal Point
[CLOSED] InfoWindow Placement

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3437075936

December 18, 2013, 03:19 PM
Jasen
[CLOSED] InfoWindow Placement
I have an HTML page that when I click the run button it opens an InfoWindow. I am wondering if there is a way to set where this window opens. I am using it on a portal page and need in a specific location. I have tried using the following code but it does not work for me.

document.getElementById( infoWinCtrl.layerID ).style.top = "90px"
document.getElementById( infoWinCtrl.layerID ).style.left = "10px"

I also tried using a variable like the calendar popup but that did not work either.

function image2_ondblclick(ctrl) {
var calendarcontrol = calendar2_calendar;
// open calendar window
calendarcontrol.show();
// move calendar window
document.getElementById( calendarcontrol.layerID ).style.top = "90px"
document.getElementById( calendarcontrol.layerID ).style.left = "10px"


Any help would be great.

Thanks

This message has been edited. Last edited by: <Kathryn Henning>,


WebFocus 8.002
PMF 8.2.3
Windows, all output
December 18, 2013, 04:51 PM
J
Could you supply the code used to open the InfoWindow?


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
December 19, 2013, 07:20 AM
David Glick
No need to code anything. When the InfoWindow opens, drag it to where you want and pin it using the icons at the top right of the window.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
December 19, 2013, 09:18 AM
Jasen
I believe this is the code that displays the info window as I have changed the location and width of the box using the HtmlPage Developer Tools, but it is IBI code that I don't want to change.

div class="IBI_InfoWnd" id="infoWinCtrl" style="border-right-width: 5px; width: 400px; display: block; font-family: Arial Unicode MS; border-top-width: 5px; border-bottom-width: 5px; height: 300px; font-size: 10pt; border-left-width: 5px; top: 10px; cursor: e-resize; left: 150px;" ontouchstart="function[e){var event=e?e:window.event;if[event){var targetEvent=event.touches.item[0);if[targetEvent&&object.doSetResizeCursor){object.doSetResizeCursor[targetEvent.clientX,targetEvent.clientY);if[object.isHandleSet[))object.doInfoResizeStart[targetEvent.clientX,targetEvent.clientY);}}}" ontouchmove="function[e){var event=e?e:window.event;var targetEvent=event.touches.item[0);if[object.isResizing[)){object.doInfoResize[targetEvent.clientX,targetEvent.clientY);event.returnValue=false;}}" ontouchend="function[e){object.doInfoDragEnd[);object.doInfoResizeEnd[);}"


WebFocus 8.002
PMF 8.2.3
Windows, all output
December 19, 2013, 09:20 AM
Jasen
I know that I can pin it. But evertime I open the portal I have to move it and re-pin where I want it. Is there a way to have it always show up where I pin it?


WebFocus 8.002
PMF 8.2.3
Windows, all output
December 20, 2013, 07:23 AM
David Glick
Once pinned, it should display in that pinned location every time it gets displayed.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
February 12, 2015, 07:06 AM
Gaurav
quote:
Originally posted by Jasen:
I know that I can pin it. But evertime I open the portal I have to move it and re-pin where I want it. Is there a way to have it always show up where I pin it?


Hello Jasen,

This has worked for me.

//Begin function button1_onclick
function button1_onclick(ctrl) {
// TODO: Add your event handler code here
OnExecute(ctrl);
document.getElementById('infoWinCtrl').style.position = "absolute";
document.getElementById('infoWinCtrl').style.top = "110px";
document.getElementById('infoWinCtrl').style.left = "190px";
}
//End function button1_onclick


But there is a cathch here. when you try to drag it from here then it goes back to its original position first. So I suggest if you are not gonna drag it much then this is perfect code for you.

Thanks & Regards,
Gaurav Tyagi


WebFOCUS 8.1.05
Windows, All Outputs