• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Pop-up incorrect placement - Fix

New Here ,
Feb 25, 2013 Feb 25, 2013

Copy link to clipboard

Copied

Issue: Incorrect location of pop-up windows.

Cause: The possible reason of this issue could be a pop-up window or an image-pop-up window and "Drop-down Hot Spot" or "Expanding Hot Spot" text exist in a topic.

RH version: I faced the issue in RH v8 with patch 2. (Not sure about other versions!)

Output: CHM, WebHelp

Solution: As a solution to the pop-up windows not showing at correct location, a script file was provided by Praful Jain (see his post on the above forum at Post#17 for more details.)

I had the same issue with the pop-up windows in few topics while in other topics it worked well. After running the said script file, the issue did not resolve for me and pop-ups were showing up at top left corner of the Help window.

I found that the script rightly resolves the issue of normal pop-up windows but it does not fix the image-map pop-up windows issue, and I was using image-map pop-ups in my window.

I did some modification to the script and executed the modified script in my project. I got my issue of image-map pop-ups incorrect placement fixed.

I have uploaded the modified version of the script file @ https://workspaces.acrobat.com/?d=L77ZP59R4Y6rTo9lG8Q4DA

Hope this script helps to all those who are facing the same problem in their projects. It worked very well for me, but I would advise all to take backup of their project before running this script.

Follow the below steps to executing the script file–

  1. Back up your project before proceeding further.
  2. Download the script file and import in script explorer in RoboHelp 8.
  3. Open the project which is having popup issue and run this script file.
  4. Once the script file execution is complete, Click on Tools>Update DHTML Effects in Topics.. menu item, and click Yes on the message box.
  5. Preview topic or generate CHM output and see if popup are working fine as expected or not.

A special thanks to Eileen for providing help. 🙂

~Vimal


Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2013 Feb 25, 2013

Copy link to clipboard

Copied

Thank you for sharing that Vimal.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 25, 2013 Apr 25, 2013

Copy link to clipboard

Copied

Hi,

Is this script file still available?

I am having the same pop-up location problem as mentioned and would like to try the script on it. Unfortunately, when I click on the link above, I am redirected to a blank screen. I have checked with my company Support and they say it isn't due to our firewall.

regards,

Christina

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

It is because the host site got reorganised. I have put out a request for the new link.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

Thank you.

cheers,

Christina

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

Correction. I assumed the link did not work because the site got organised. In fact the link is still working just fine, I tried it. Something is blocking it for you so go back to IT or try the link from home.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 26, 2013 Apr 26, 2013

Copy link to clipboard

Copied

I got back to Support and they did their voodoo and downloaded the script for me. Have run it and my problem is now fixed.

A big thank you to both of you. 🙂

cheers,

Christina

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 27, 2014 Feb 27, 2014

Copy link to clipboard

Copied

LATEST

Since workspaces.acrobat.com is retiring soon, placing the file here itself:

---------------------------------------------------------

/************************************************************************************************************

* $$FileName                    Popup Placement Fixer.jsx

*

* $$Description             Sample ExtendScript file Fixes the popup placement issues in CHM output of RoboHelp 8

*

* Author                                        Praful Jain

* Copyright (c) 2009 Adobe Systems Incorporated. All Rights Reserved.

* Modified by: Vimal Chhutani (22.02.2013) to include Image Map pop-window placement

*************************************************************************************************************/

var topicmgr;

main();

function main()

{

          msg('Starting The Fixing Process');

          topicmgr = RoboHelp.project.TopicManager;

          FixAllPopups();

          msg('Done with Fixing');

}

function FixAllPopups()

{

          if(topicmgr.count>0)

          {

                    var topic = topicmgr.item(1);

                    while(typeof(topic)!='undefined')

                    {

                              FixPopupInTopic(topic.path);

                              topic = topic.next;

                    }

          }

}

function FixPopupInTopic(filepath)

{

          msg('Parsing Topic '+filepath);

          //we will create al popup ID with name PopupID+count

          var stringToSearch = 'javascript:bsscpopup(';

          var tokenmgr = RoboHelp.getTokenManager(filepath);

          var bSave = false;

          if(typeof(tokenmgr)!='undefined')

          {

                    if(tokenmgr.count>0)

                    {

                              var token = tokenmgr.item(1);

                              while(typeof(token)!='undefined')

                              {

                                        //check if it is text or not

                                        if(token.tokenType == RoboHelp.TokenType.TOKENTAG) // && token.tagType == RoboHelp.TagType.TAGANCHOR)

                                        {

                                                            //we need to find the href attribute and see if it contains  javascript:BSSCPopup(

                                                            var hrefString = token.getAttribute('href');

                                                            if(typeof(hrefString)==='string' && hrefString.length>0)

                                                            {

                                                                      var orghrefString = hrefString;

                                                                      hrefString = hrefString.toLowerCase();

                                                                      if(hrefString.indexOf(stringToSearch)!=-1)

                                                                      {

                                                                                //this is the token with popup link, we need to find the onclick attribute now

                                                                                var onClickAttribute = token.getAttribute('onclick');

                                                                                if(typeof(onClickAttribute)=='undefined' || onClickAttribute.length==0)

                                                                                {

                                                                                          msg('Found buggy popup Links Fixing now');

                                                                                          //we found a popup with issue

                                                                                          //fix the popup now

                                                                                          //we need to set the href as javascript:void(0);

                                                                                          token.setAttribute('href','javascript:void(0);');

                                                                                          //now add the onMouseover attribute

                                                                                          token.setAttribute('onmouseover','if (parseInt(navigator.appVersion) >= 4 && typeof(BSPSPopupOnMouseOver) == \'function\') BSPSPopupOnMouseOver(event);');

                                                                                          //set onclick attribute now

                                                                                          orghrefString +=';return false;';

                                                                                          token.setAttribute('onclick',orghrefString);

                                                                                          bSave = true;

                                                                                }

                                                                      }

                                                            }

                                        }

                                        token = token.next;

                              }

                    }

          }

          else

                    alert('there is some error in getting the token manager');

 

          if(bSave)

          {

                    msg('saving file '+filepath);

                    tokenmgr.save();

          }

}

function msg(szString)

{

          RoboHelp.project.outputMessage (szString);

          RoboHelp.project.outputMessage ('\n');

}

---------------------------------------------------------

~Amit Agarwal

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp