Skip navigation
mdchase1313
Currently Being Moderated

Invoke "navto://" from javascript?

Mar 27, 2012 6:28 AM

Hey all -

 

I'm putting together an HTML article. There's a full-page gallery that, when swiped up and down, changes the image. I'd like to also set it so that if the user swipes to the right or left, we would "navto" the previous or next article. I've seen examples of using "navto://" with a button, but haven't seen how to invoke it in a javascript function (I've read that "window.open" doesn't work). Can anyone help?

 
Replies
  • Bob Bringhurst
    4,649 posts
    May 29, 2007
  • Bob Bringhurst
    4,649 posts
    May 29, 2007
    Currently Being Moderated
    Mar 27, 2012 9:41 AM   in reply to mdchase1313

    I'm not aware of any way to do that.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 27, 2012 5:55 PM   in reply to Bob Bringhurst

    I hope it helps you.

    http://forums.adobe.com/message/4233931#4233931

     

    I created goto index button in Edge as above and it worked well.

     

    shimoawazu

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2012 8:56 AM   in reply to shimoawazu

    Thanks shimoawazu, but as I posted above, I'm not looking for a button or link based solution.

     

    Basically, is there an equivalent for window.href = "navto://myarticle#3"?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 29, 2012 9:32 PM   in reply to mdc1313

    Edge build javascript file with navto:,

    Tap the Button, move to Index page.

     

    I hope this codes helps you.

     

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

    * Adobe Edge Composition Actions

    *

    * Edit this file with caution, being careful to preserve

    * function signatures and comments starting with 'Edge' to maintain the

    * ability to interact with these actions from within Adobe Edge

    *

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

    (function($, Edge, compId){

    var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes

     

     

    //Edge symbol: 'stage'

    (function(symbolName) {

     

    Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {

    var myElementVar = sym.lookupSelector('Text2');

    $(myElementVar).append($('<a style="display:block;width:100%;height:100%;" href="navto://00_Index" />'));

     

    var myElementVar = sym.lookupSelector('RoundRect');

    $(myElementVar).append($('<a style="display:block;width:100%;height:100%;" href="navto://00_Index" />'));

     

    });

    //Edge binding end

     

    })("stage");

    //Edge symbol end:'stage'

     

     

    })(jQuery, AdobeEdge, "EDGE-3548826");

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 3, 2012 7:23 AM   in reply to shimoawazu

    Hi shimoawazu -

     

    Again, that'd code for a button click. I'm looking for a way to navigate to another stack without having to click anything.

     

    I'm getting the idea there's no way to do this. That's rather disappointing.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 5:38 AM   in reply to mdc1313

    Hi mdc1313!

     

    You can do that with the YUI (Yahoo User Interface). There is a simulate function.

     

    http://yuilibrary.com/yui/docs/api/classes/Event.html#method_simulate

     

    Here is a short example:

     

     

    <html>

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

                        <title>Untitled Document</title>

      <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>

     

      </head>

      <body>

      <a href="javascript:alert('simulated click');" id="button">Click here!</a>

     

    <script>

    YUI().use('node-event-simulate', 'node', function (Y) {

     

        Y.one('#button').simulate('click');

    });

    </script>

     

      </body>

    </html>

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points