No announcement yet.

how to change the help pop-up location in the browser window

  • Filter
  • Time
  • Show
Clear All
new posts

  • how to change the help pop-up location in the browser window

    I am creating some help messages for the fields on a single record form. The hints work as they should but, if I use a pop-up, the actual pop-up window is always at the top left of the browser window.

    I would prefer it to be in the middle. Is there any way to change this?
    David Goadby, North Wales.

  • #2
    AFAIK ScriptCase doesn't provide any option to do that, so the only way would be modifying the javascript function that opens the new window. Inspecting the help button through Google Chrome, this is the function:

    function nm_mostra_mens(campo){
        NovaJanela = (--URL--, "ScriptCase", "height=100, width=300, resizable, scrollbars");
    That means you'd have to overwrite this function. You can achieve this by adding this piece of code in the onLoad event (or creating a library for this and calling it on onLoad):

        var __nm_mostra_mens = function(campo){
            // ps1: you have to change the --URL-- to the actual URL in the generated code
            // ps2: the change is made by adding the left and top parameters
            // ps3: if you want to center the window, you have to calculate the position
  , "ScriptCase", "height=100, width=300, resizable, scrollbars, left=300, top=300");
        // delay the overwriting process, because the original function is created later on the code
        setTimeout("nm_mostra_mens = __nm_mostra_mens", 300);
    Well, it's not simple, but it's possible. And maybe it's not worth, specially if you plain to do this in a lot of applications.
    SC Tools: A browser extension to make working with ScriptCase simpler and even more productive.