iframe link to #anchor only works the second time

I am exploring a way of delivering a local HTML file into a Web Content frame in such a way that it starts at a specific HTML anchor rather than the top of the HTML page.
Now, since DPS's Web Content overlay does not support the URL+anchor string format (e.g. myfile.html#myanchor), I thought I might achieve the desired result by loading a little HTML file into the Web Content overlay that points to the intended HTML file and its named anchor in an <iframe> tag.
Here's where it gets annoying. The solution works... but only on the second and subsequent times you call up the Web Content overlay (normally hidden in a MSO).
The first time I call up the Web Content overlay in my DPS article on the iPad, however, the HTML page displays but not at the specificed anchor point, nor indeed at the top of the HTML page - instead, it seems to start a little bit further down from the anchor. If I dismiss the Web Content overlay (in my case, switch to a different Object State) and return to it, the HTML reloads starting at anchor position, exactly as intended. I can close the folio, re-open it and still the behaviour is correct. It was only the first time that it fails to do the right thing.
I am very happy that my solution works on the second, third and all subsequent occasions, but it's pretty important that readers see it working first time.
I have tried delaying the autoplay of the Web Content but this does not make any difference. The anchor is designated using the 'id' tag.
Any ideas?

Thanks, Neil. But you can ask your guys to stand down. Someone got me a strong coffee this evening and I realised I was tackling this from the wrong angle. I have since seen this issue of HTML pages requiring a refresh before displaying correctly in other circumstances, even in Chrome on my computer, so I doubt it is a specific DPS problem - possibly it's something in webkit.
Anyway, the coffee made me realise that I don't need an iframe to load another HTML file at an anchor. All I need is to pop a little GoToAnchor script in the <head> tag and a call at the beginning of the <body> tag.
One day, if someone fixes Adobe's utterly broken Cookbooks site, I'll upload a bunch of these recipes.

Similar Messages

  • EPCF not working the second time

    Hi all,
    we are developing using four iViews in the same screen: one left menu, one top menu, a footer and a main view in the central part.
    We use launch a EPCM.raiseEvent by clicking in one link in the footer which causes a change in a field in the central iView by using a handlerFunction launched by a EPCM.subscribeEvent and it works properly. Then we click on a button in the central iView who changes the complete content of the iview by going to another JSP. It only changes the central part. Then by raising a different or the same event in the footer to change another field in the new central part (by using another EPCM.subscribeEvent sentence) don't work. We have detected that the second time we try to use the EPCF around the application it does not work. Only works the first time the first screen is loaded.
    What could be the problem????
    Many Thanks.

    You need to contact Adobe Support either by chat or via phone when you have serial number and activation issues.
    Here are some links to help make contact:
    http://www.adobe.com/support/chat/ivrchat.html
    http://www.adobe.com/support/download-install/supportinfo/

  • ToolBoxTools.addEventListener only works every second time

    Hi!
    Our layouts pretty often click on the "page tool" by mistake and it happened a few times, that they changes the size of the page without even noticing. Because there is no way to remove the tool from the toolbar (I guess?), I wanted to write a script, that at least shows a message, that the page tool ("Seitenwerkzeug" in german) was selected. Unfortunately the event listener only works every second time:
    1. indesign starts > selection tool is active
    2. click on page tool > message appears > page tool is active
    3. click on "another tool1" > "another tool1" is active
    4. click on "another tool2" > "another tool1" is active
    5. click on page tool > nothing happens, the icon of the page tool is active, but the icon of the "another tool2" is still active, too, and "another tool2" is still activated
    6. click on "another tool3" > "another tool3" is active
    7. click on page tool > message appears > page tool is active
    8. ......
    Any idea why that is?
    My script:
    #targetengine myToolListener
    app.toolBoxTools.addEventListener ("afterAttributeChanged", changeToolAlert);
    function changeToolAlert() {
        if(app.toolBoxTools.currentToolName == "Seitenwerkzeug") {
            alert ("Message", "Title");
        exit(); //i tried with and without this!
    At the beginning I tried to use an confirm message instead of an alert, which had the same problem and I thought it might be because the changing doesn't work... but it seems I can't even work with the information without something "crashing" in the background?
    My previous confirm Function:
    function changeToolConfirm() {
        if(app.toolBoxTools.currentToolName == "Seitenwerkzeug") {
            var confirmDialog = confirm("Do you really want to activate the page tool?", true);
            if(!confirmDialog) {
                app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;
    I really hope someone has an idea
    Best,
    Anke

    Hi Anke,
    The problem, I think, comes from the fact that the Page Tool selection event (which you listen to via afterAttributeChanged) needs some time to complete. Since the alert() or confirm() instruction gives the focus to a new modal window before the event life-cycle is finished, the GUI becomes instable, the PageTool icon state is not properly restored, and your event management goes wrong.
    A way to solve this might be to queue a temporary IdleEvent listener once the Page Tool selection event is caught. That is, we do not initiate any modal dialog as long as the GUI is refreshing.
    Something like this:
    //====================================================
    // PageToolDisclaimer.jsx
    //====================================================
    // Should be useable as a startup script, no #targetengine required
    // NB - MutationEvent is known to create a global 'evt' variable
    // so we don't seem to need a persistent session engine here :-)
    // That's why the active script File is used as the event handler
    (function(/*File*/EVENT_HANDLER, /*str*/TASK_NAME, /*uint*/TASK_TIME, /*str*/PAGE_TOOL_NAME)
        var t;
        // Installer
        if( !(t=app.toolBoxTools.eventListeners).length )
            t.add(MutationEvent.AFTER_ATTRIBUTE_CHANGED, EVENT_HANDLER);
            return;
        // IdleEvent handler (--> confirm)
        if( (t=app.idleTasks.itemByName(TASK_NAME)).isValid )
            t.eventListeners.everyItem().remove();
            t.remove();
            if( !confirm("***WARNING***\rDo you really want to activate the page tool?", true) )
                app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;
            return;
        // PageTool event handler
        if( ('evt' in $.global) && 'currentToolName'==evt.attributeName && PAGE_TOOL_NAME==evt.attributeValue )
            evt.stopPropagation();
            app.idleTasks.add({name:TASK_NAME, sleep:TASK_TIME})
                  .addEventListener(IdleEvent.ON_IDLE, EVENT_HANDLER);
    })(app.activeScript, 'WaitPageTool', 400, app.translateKeyString('$ID/Page Tool'));
    Hope that helps.
    @+
    Marc

  • HT201320 Setting up mail only works the first time and then fails...

    Hello,
    I own a new iPad 4.
    Setting up my own mail accounts works great for the first time (I see new mails and I can sent mails), but the second time I open the Mail-App it complains about my mail settings.
    Mails are provided from my own domain. Using other mail clients I don't have issues.
    Setting is based on IMAP ssl/port 993 and ssl/578. iPad runs on IOS6.1.
    Do you have an idea why?
    Carsten

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • [Solved] DVDs and CDs only work the first time I put them in

    First lets get this straight before it is asked later on down the line. I am a 6 year Linux user and 2 year Arch user. I am currently using xfce4 and thunar as my file manager with thunar-volman installed. This has been a problem for the past year or so. I use my laptop most of the time (also Arch 64 and working like a dream) so I only try fixing it every so often to no avail.
    I can put in a CD or a DVD and play them with VLC. Here's the catch: after I eject the CD/DVD and put in another one I can't play it or find it. The first time I put one in I even get an icon on the desktop. I don't think it's reasonable to have to reboot everytime I want to play another DVD (time wasted by constant rebooting is one of the very long list of reasons I don't use Microshaft products). I'm stumped, I can't be the only one, but my forum searches yield no treasures.
    Last edited by astrozombie (2010-02-03 01:00:15)

    Thanks for trying, however, I posted what I use for a reason. I am using VLC, and I am a minimalist so I don't want a bunch of programs for doing the exact same thing. VLC is the only player for Linux that plays MTS files out of the box, so I'm not interested in switching or adding another.
    Anyways, it's irrelevant because as I said before, thunar mounts it correctly the first time I put in a DVD or CD and displays an icon on the desktop for the disk. Therefore the problem is most likely hal related, since this began about the time we switched to hotplugging, and besides this I love hotplugging so I am also not interested in disabling that (who know what problems I'll introduce for my MAC keyboard and webcam if I do that). Yes I've read the hal and dbus wikis.
    I can even get a USB CD writer to work with xfburn, however it's a relic and I think that's a sorry work around when I have internal drives that, in theory, work just fine. I wonder if it has anything to do with the drives being IDE when I used the SATA install option on the install disk (I did a fresh install last week) since my hard drives are SATA.

  • My AS3 buttons only work the first time

    I have set up my buttons so that are each a movieclip with 'over' and 'out' states/frame labels. They exist on the main timeline. The actionscript controlling them is situated in a frame on the main timeline and the frame holding that actionscript is on the same point within the main timeline where the buttons are introduced. I am using actionscript 3.
    The buttons have been set up so that they navigate to another frame on the same main timeline and on that frame is a movie. The movie dimensions are smaller than the main stage so the buttons are still accessible when each movie is played.
    The problem is my buttons are only working once - by that I mean they go to the correct place when clicked the first time, but when they are clicked again they navigate elsewhere.
    Totally doing my head in trying find a solution and if anyone can help and show me what I'm doing wrong that would be really really helpful. Here's the code I used for the buttons...
    stop();
    function mainBtnOver(event:MouseEvent):void {
    event.target.gotoAndPlay("over");
    function mainBtnOut(event:MouseEvent):void {
    event.target.gotoAndPlay("out");
    ///////// INDIVIDUAL BUTTON CLICK FUNCTIONS
    function mainBtn1Down(event:MouseEvent):void {
    gotoAndPlay("01Movie");
    function mainBtn2Down(event:MouseEvent):void {
    gotoAndPlay("02Movie");
    function mainBtn3Down(event:MouseEvent):void {
    gotoAndPlay("03Movie");
    function mainBtn4Down(event:MouseEvent):void {
    gotoAndPlay("04Movie");
    function mainBtn5Down(event:MouseEvent):void {
    gotoAndPlay("05Movie");
    ////////// Button 1 Listeners
    mainBtn1.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn1.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn1.addEventListener(MouseEvent.CLICK, mainBtn1Down);
    ////////// Button 2 Listeners
    mainBtn2.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn2.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn2.addEventListener(MouseEvent.CLICK, mainBtn2Down);
    ////////// Button 3 Listeners
    mainBtn3.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn3.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn3.addEventListener(MouseEvent.CLICK, mainBtn3Down);
    ////////// Button 4 Listeners
    mainBtn4.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn4.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn4.addEventListener(MouseEvent.CLICK, mainBtn4Down);
    ////////// Button 5 Listeners
    mainBtn5.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn5.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn5.addEventListener(MouseEvent.CLICK, mainBtn5Down);
    I'm sure it's me doing something very stupid - I'm very new to AS3. Any help much appreciated.
    Thanks :-)

    If the frame labels you are going to have movie clips that have your presentation content, you should use gotoAndStop("frameLabel") instead of gotoAndPlay("frameLabel"). There's no need to play the main timeline when you go to and show any of these movie clips. I'm not sure if this is your issue, though... Using your code, I had no problems.
    Also, you can set up your animated buttons in a way that eliminates the need to have your ROLL_OVER and ROLL_OUT events. This isn't necessarily better, but just another method. Although I might use other ways to animate a button, I do like to reduce the code it takes to use the buttons in an interface, and only use CLICK in most cases.

  • Suspend command only works the first time

    I'm seeing a strange issue with my machine. If I suspend the system by using either:
    systemctl suspend
    or
    dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
    the system will suspend the first time, but then if I try to suspend again, it doesn't suspend completely. The screen goes black and my external hd shuts down, but the box doesn't shutdown. It stays running.
    Could anyone offer some suggestions on what to check?
    I checked the systemd journal and I don't see any errors that stand out as being the problem.
    Last edited by Gumper (2013-03-03 13:28:56)

    I've got a similar error. When trying to suspend via systemctl the machine goes down.
    The screen goes blank and I can hear my harddrives spinning down but before they go completely silent, the system comes back up again.
    Fully working as if I never even wanted to suspend. I'm pretty sure my drives don't like that a lot.
    The first time after a boot works however, as mentioned by Gumper.
    systemctl reports this:
    A dependency job for suspend.target failed. See 'journalctl -xn' for details.
    But I can't see anything related in the journal.
    This is my second suspend problem now. I already have trouble waking up from suspension on my notebook:
    https://bbs.archlinux.org/viewtopic.php … 5#p1238615
    This new problem now is on my x64 desktop machine if that helps. Of course this happens on the same day I clean my pkg cache
    Last edited by Orim (2013-03-03 22:56:03)

  • Open PDF documents only works on second time

    Hallo,
    When I want to open a PDF document in a navigation iView the first time only a white browser-page will be opened. When I close the empty window and open the document once again, the acrobat reader displays the document.
    We are on NP 7.0 Stack 15 and IE 6.
    Any idea?
    Regards,
    Gerhard

    Hello Gerhard,
    I think this was a known issue, have a look at the following links:
    http://www.adobe.com/support/techdocs/328233.html
    http://www.adobe.com/support/techdocs/331025.html
    There were also some known PDF issues which were fixed in newer versions, see SAP note 1146711 and 700177.
    Regards,
    Lorcan.

  • Screen suspend + gnome only works the first time

    Hi all,
    Being new here , i hope i'm posting in the right place.
    I've just installed arch i686 , everything is running like clockwork, nearly everything actually.
    i'll try to explain the problem shortly.
    i've set screensaver to start after 1minute and the screen to suspend after 2 for testing. After a boot, these settings works like a charm, moving the mouse, enter password and go on working. After that, after 1 minute idling, screensaver starts but the screen never switch off. If i open the gnome application to manage power, re-apply my settings, it will work but just the first time.
    It's not a big issue, i know that i've just have to re appply settings each time i leave or switch off monitors manually but it's a bit annoying, and i'm curious , i'd really like to solve this little problem. As i'm not a linux guru at all, i don't know where to start searching, any clue will be greatly appreciated.
    Thx in advance.
    Jojo.
    P.S.: sorry if it's a bit confused and for my english .

    Thx for your answer loafer,
    i'm still "googleing" to find a clue. I'm sure the answer is simple, one day, i ll find it.
    I'm still looking for clues anyway.
    Thx in advance.
    Jojo.

  • HTTPService.send() only works the first time

    I have the follow HTTPService defintion in my mxml page:
    <mx:HTTPService
    id="updateRequest"
    url="{accessURL}"
    useProxy="false" result="onSuccessEvent(event)"
    fault="onFailEvent(event)">
    <mx:request>
    <username>{userName}</username>
    <password>{password}</password>
    <id></id>
    <sname></sname>
    <value></value>
    <randomNum>0</randomNum>
    </mx:request>
    </mx:HTTPService>
    Here is my call:
    updateRequest.request.id= myid;
    updateRequest.request.sname= myname;
    updateRequest.request.value = myvalue;
    updateRequest.request.randomNum = Math.random();
    updateRequest.send();
    The first time call is successful, but second time(after 30
    seconds), after send() function call, I didn't even received
    HTTPService call from server side. Is this somehow cached or I need
    to reinitial it? This looks strange.

    I am having the same issue but have already been using the
    post method. When I click my refresh button or if the timer I have
    set up resets I see no request made to the server.
    private function onResult(Event:ResultEvent):void {
    var myNum:int = Math.round(Math.random() * 2);
    var xmlResult:XML = XML(Event.result);
    _xlcMyListData = new XMLListCollection(xmlResult..asset);
    <mx:HTTPService id="tempXML" resultFormat="e4x"
    result="onResult(event)" method="POST" url="
    http://mysite.net/info_wrapper.php?customer={customer.text}&amp;username={username.text}&a mp;password={password.text}"
    useProxy="false"/>
    <mx:TileList dataProvider="{_xlcMyListData}"
    labelField="fleet" left="35" right="15"
    width="350" backgroundColor="#000000" color="#ff0000"
    fontSize="27" borderColor="#000000" columnWidth="315"
    rowHeight="50" themeColor="#808080" fontWeight="bold"
    allowMultipleSelection="true" id="TileList1" height="0" y="202"
    x="178"/>
    <mx:Button label="Refresh Page Now" height="27"
    fillAlphas="[1.0, 1.0]" fillColors="[#030000, #030000, #474545,
    #474545]" borderColor="#DCDEDF" click="tempXML.send();"/>

  • AutoPlay Only Works the First Time

    Our customer is getting a little annoyed by something happening with their CP4 outputs, and I'm not sure if it's "normal" or something's wrong.
    The .swf/html plays fine the first time through.  However, if a user re-accesses and launches the file again, it plays the first slide, and then jumps to the end.  We've checked our navigation and it seems to be fine (go to next slide). We removed the status flags, thinking there was some sort of cookie being set that identified this module as already been played by the user.  The problem happens whether it's being served up from a web server or played on a local machine.
    I'm taking a big hit on this.  And I don't know where else to look.
    I have to fix this..any suggestions?
    Thanks heaps.

    Hi there
    My guess is that you need to click Project > Table of Contents. Then click Settings... and ensure the Self Paced Learning option is cleared.
    If you find the option is already cleared, you might then investigate the Flash Player version.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • DLL Call doesn't work the second time

    The first time I open the VI, it runs properly. Why doesn't doit the next time I open it.
    Attachments:
    PGS67Open.llb ‏72 KB

    Dobi,
    Please post the dll. I cannot run your code without it.
    Also, the problem may be that you cannot call this twice, without first 'closing' the device. You may be trying to use resources that are already in use. This would be the same as opening a daq session that is already in use.
    Try that, and if you can't get it working still, post the code or some more information.
    Good luck

  • RSDRD_DELETE_FACTS will only work the 1st time it runs in the chain

    I've created a deletion program via RSDRD_DELETE_FACTS the way it states so it can be ran from a process chain.  It seems to work fine the 1st time the chain runs and then after that it doens't work.  I did a debug of it my slection criteria for my deletion are not saving even though I do the F8 2 times like it says.
    any ideas?

    I was able to fix our issue of it not deleting after the 1st run. 
    You can create the delte program using RSDRD_DELETE_FACTS.  when you hit execute you will need to put in the data target and then select Generate deletion program and give it a name. 
    then you will need to go into the code it generated and comment out the line below.  If this is not commeted out it deletes this from the table everytime and it doens't save your deletion parameters.
    DELETE FROM DATABASE RSDRBATCHPARA(DE) ID L_UID.
    Hope this helps

  • Activation/serial number not working the second time

    I just got a new laptop because my old one died and when I went to put in my serial number given with the program it wouldnt work, is there a way to get a new one or something? I have photoshop elements 8
    Help

    You need to contact Adobe Support either by chat or via phone when you have serial number and activation issues.
    Here are some links to help make contact:
    http://www.adobe.com/support/chat/ivrchat.html
    http://www.adobe.com/support/download-install/supportinfo/

  • Button actions only work the first time used then nothing?

    This is what I have...
    I Have 2 buttons in MC named mcMovieTrans the AS for these buttons are in the MC's timeline, the code is:
    stop();
    function playLifeboy(event:MouseEvent):void
    gotoAndStop(3);
    function playKrave(event:MouseEvent):void
    gotoAndStop(2);
    lifeboy_btn.addEventListener(MouseEvent.CLICK, playLifeboy);
    krave_btn.addEventListener(MouseEvent.CLICK, playKrave);
    when the buttons are activated they go to there corresponding frames and Stop. As an example of what happens next I'll show you frame 3 which plays MC mcKraveMovie:
    Frame 45 has a flv. movie on it that plays at this frame. The AS for this timeline on Frame 45 is:
    stop();
    function playReturn(event:MouseEvent):void
    gotoAndPlay(46);
    return_btn.addEventListener(MouseEvent.CLICK, playReturn);
    The AS for the timeline on Frame 90 is:
    MovieClip(parent).gotoAndStop(1);
    This is where the problem occurs because when this action takes place and it returns to the parent MC (mcMovieTrans) The buttons actions dont work anymore.
    And I get this error message:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at capQinc_fla::mcMovieTrans_89/frame1()[capQinc_fla.mcMovieTrans_89::frame1:15]
    at flash.display::MovieClip/gotoAndStop()
    at capQinc_fla::mcKraveMovie_97/frame90()[capQinc_fla.mcKraveMovie_97::frame90:1]
    Thanks

    Thanks,
    I replaced all the button symbols that where in tweens on the MC mcKraveMovie with static art. But I still Get this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at capQinc_fla::mcMovieTrans_89/frame1()[capQinc_fla.mcMovieTrans_89::frame1:15]
    at flash.display::MovieClip/gotoAndStop()
    at capQinc_fla::mcKraveMovie_97/frame90()[capQinc_fla.mcKraveMovie_97::frame90:1]
    This is the timeline for the (Parent) MC mcMovieTrans:
    If that helps at all, the only place where the buttons are (and there actions) are in Frame 1 of this Timeline
    Thanks

Maybe you are looking for