Hyperlink to a page

Hi all
I am trying to link all my images in a document.
If I recognize the filename and it is a logo (only a limited logos are present) I link to the URL
All others must link to a given page number.
The first part works. But I can not figure out how to make the link to a page...
     case "cat 22m95y v1.eps":       
            var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
            myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("www.catfootwear.com");
            myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
            myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL );
            myHyperlink.visible=true;                                 
    break;
    default:
            $.writeln ("myImageJumperPage " + myImageJumperPage );
            $.writeln ("myImageJumperPage " + Number (myImageJumperPage) );
            var bla = Number (myImageJumperPage) ;
            $.writeln ("bla " + bla);
            var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
            myHyperlinkPage = myDocument.hyperlinkPageDestinations.add();
            myHyperlinkPage.destinationPage.pageNumber = myImageJumperPage;
            myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
            myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource, myHyperlinkPage);
            myHyperlink.visible=true;   
Any hins appreciated
Romano

OK I get it the reference to a page does not work based on a number as in go to page 10
Needed to create the reference in "page" terms first.
            var destPage = myDocument.pages.itemByName(myImageJumperPage.toString());
This line changes (type cast) the number to a string, then finds the page with that (String)Name and creates a reference.
I guess this could be coded in a more direct way, but I am happy.
The code does the job
Thanks for your help Hans
    case "cat 22m95y v1.eps":       
            $.writeln ("Found a logo, jump to website 2");
            var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
            var myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("www.catfootwear.com");
            var myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
            var myHyperlink = myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL );
            myHyperlink.visible = true;                                 
    break;
    default:
            $.writeln ("Found any image, create link to the price list on page: " + myImageJumperPage );
            var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
            var destPage = myDocument.pages.itemByName(myImageJumperPage.toString());
            var myHyperlinkDestination = myMakeHyperlinkDestination(destPage, myDocument);            
            var myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
            var myHyperlink = myDocument.hyperlinks.add(myHyperlinkSource, myHyperlinkDestination);
            myHyperlink.visible = true;   
function myMakeHyperlinkDestination(myDestPage, myDocument){
    //If the hyperlink destination already exists, use it;
    //if it doesn't, then create it.
    try{
        var myHyperlinkDestination = myDocument.hyperlinkDestinations.item(myDestPage);
        myHyperlinkDestination.name;
    catch(myError){
        myHyperlinkDestination = myDocument.hyperlinkPageDestinations.add(myDestPage);
        myHyperlinkDestination.destinationPage = myDestPage;
    //myHyperlinkDestination.name = myDestPage.name;
    //Set other hyperlink properties here, if necessary.
    return myHyperlinkDestination;

Similar Messages

  • How do you HYPERLINK a web page address to an EXCEL document in Firefox like is possible in Explorer

    How do you HYPERLINK a web page address to an EXCEL document in Firefox like is possible in Explorer?

    When you follow a hyperlink in Excel, usually it should open in your default browser. You shouldn't have to do anything special in Excel to create the link when Firefox is your default browser compared with IE. However, the Insert Hyperlink dialog might work differently. I think it might be able to automatically pre-populate a URL from IE, while in Firefox, you need to copy the URL from Firefox's address bar and paste it into the Insert Link dialog.

  • Hyperlink to a Page in the current document ? LiveCycle v8.2

    Can anyone help me with the syntax to hyperlink to a page in the current PDF ?
    I have not been able to locate any information on this !
    This is a fill able XFA form & am attempting a Table of Content TextBox on the Main page with links to different parts of the form.
    Thanks
    Aubrey

    All:
    What I am looking for is something similar to the hyperlink options in Adobe Pro where you can specify a page # to go to.
    Unfortunately, LiveCycle only has the option for a URL or an email. And For the URL, it generates an <a href="the URL"> syntax.
    Is there a way to get it to generate a <a id=Page3> javascript ?
    Or maybe force the <a href=""> to use an Id in the existing document ?
    Aubrey

  • How do I navigate from a hyperlink on one page to an anchor within the tab widget?

    Hi guys can you please assist me with that issue I am describing in the question: How do I navigate from a hyperlink on one page to an anchor within the tab widget? I assume that it is not working because the tab widget is truly just on one page and anchors work within a page but not a specific tab. Is there a way around that?
    Thanks.

    an interesting question. Anchors work across pages (global) without any problem. Do they work within tabs or any other widgets I haven't tried, but it looks like you have and without success. I can see the temptation for doing this, but if you think about it why would you? Set the anchor on the page next to the tab(s) and hey presto the user needs only click the tab to which the hperlink refers, nothing could be more convenient! Of course, if the user cannot relate the tab to the hyperlink there's a problem. Generally solved by titling (like if the hyperlink is cats, the tab should preferably read cats and not dogs)! It's the only work around i can think of. Hope it helps.

  • Create hyperlink to "next page"

    Is there a way to create a hyperlink on a master document that automatically goes to the next page in the document?
    I can't find that option anywhere, which seems very strange. If I have a document of 50 pages, it is incredibly tedious to have to add a hyperlink to each page with the next page's page number on it, rather than just having a hyperlink in the master document which automatically goes to the next page.

    The hyperlink option won't let you do this, but you can use the button feature instead: add an invisible button over your text frame and add the action "Go to Next Page" to that button.

  • I created a word document with hyperlinks. When my default browser is Chrome the hyper links work. When the default browser is Safari, the hyperlinks bring to pages that just lines and lines of symbols. I need these links to work in both browsers.

    I created a word document with hyperlinks. When my default browser is Chrome the hyper links work. When the default browser is Safari, the hyperlinks bring to pages that just lines and lines of symbols. I need these links to work in both browsers. Any ideas?

    version 10.6.8

  • Hyperlink to iWeb Page not working

    I have created an iWeb page. I have a hyperlink to the page on a document. The hyperlink takes me to a mobile me error page ie "We can't find the page you requested. Please make sure the URL is spelled and capitalized correctly, and try again."
    Yet if I copy and paste the exact same url I have entered in the hyperlink filed into the address bar on Safari it goes to the right page no problems.
    Any ideas please?

    Is that the page you're trying to link to in the PDF document?
    I was able to place a hyperlink in an rtfd text file and and Word 2008 document to your web page that works. The link in the Word document takes about 5 to 7 seconds to get to Safari and open the Page. The rtfd document, created with Bean
    Bean, a great, free word processor, opens the page in Safari almost immediately.
    In Work I used the Insert ➙ Hyperlink menu option and entered the URL of you page and the text to use as the link. For the Bean document I clicked and dragged the link title at the top of your web page onto the Bean page and saved as a rtfd formatted file. If the page is saved as a plain text document the hyperlink is lost.
    Click to view full size
    If I do a Print ➙ PDF ➙ Save as PDF from Bean I get a working link in the resulting PDF file. But with Word the link does not work.

  • How to setup the Hyperlink from one page to another page

    Hi,
    I am new to Oracle APEX. My requirement is to setup a Hyperlink from one page to another page.
    Currently I am displaying 4 columns in the report of Page 1. The report is like below,
    Survey Response Count_of_Cities City_Name
    AB Y 2 LONDON,CHICAGO
    AB N 3 DELHI,MUMBAI,CHENNAI
    AC Y 1 LONDON
    AC N 4 TOKYO,HONGKONG,BANGALORE,HYDERABAD
    But the revised requirement is I need to show the City_name in another page i.e. Page 2 when the user clicks on value of the Count_of_Cities. i.e. If the user clicks on 3, In page 2 the values should be appear like below
    DELHI
    MUMBAI
    CHENNAI
    If I click on the 4, the values in the page should be like below,
    TOKYO
    HONGKONG
    BANGALORE
    HYDERABAD
    Currently in Page 1 I am hiding the City_Name and created a Hyperlink on Count_of_Cities. When clicked on Count_of_Cities it is navigating to Page 2. But the values for City_Name are not showing properly.
    Please sugegst how I can show the City_Name values in page 2?
    Please let me know if you require any additional information.
    Please provide the solution. The requirement is urgent.
    Thanks in Advance
    Edited by: 980540 on Jan 9, 2013 3:08 AM

    I got the answer on my own.

  • How to include hyperlink in Endeca page

    I have a requirement about including hyperlink into Endeca page. I have an endeca page including external web contents, let's say the url is http://localhost:8080/web/guest/a. I have another endeca page showing orders. When user click on an order on that endeca page, it should go to http://localhost:8080/web/guest/. I just want to know how to implement this feature in Endeca. Any help is appreciated.

    For now I can click one of the items in the guided navigation and then go to another endeca page which has OA page in it. Another question for this, could I get the data for what user choose? Say user choose item1 in the guided navigation, then the OA page knows user choose this item and user does not need to enter item id to update the quantity of this item (say the filed of item id is filled automatically because OA page gets data from endeca). The reason why I want to do like this is Endeca cannot update data so I need to use OA framework to update. Does anyone know how to implement this scenario?

  • How to create hyperlink in Html page using Java

    Hello every one
    I want to know that how can I create a hyperlink in Html page using java ?
    Let for example
    I have code like this and i want to give hyperlink to it using java.
    rember that i am creating node using this id="name" which give me multiple value. and i want to assign diff link to each name..?
    <tr>
    <td ><span id="name"></span>
    </tr>

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • Hyperlink to specific page in PDF doesn't work in Safari

    Hyperlink to specific page in PDF doesn't work in Safari

    Here is the URL http://www.soka.edu/files/documents/academics/academic-catalog-2013-2014.pdf#page=83
    It works in Windows machine but not in ipad safari.
    Thank you,
    Rutvi

  • Hyperlinks to web pages don't work in Captivate 7 or 8

    When I design hyperlinks to web pages work but once published they don't. How do i get hyperlinks to web pages to work in Captivate 7 or 8

    I should have read that more closely.
    It doesn't seem to apply. The only reason that would matter is if you were running the SWF-output from Captivate locally.
    ALWAYS test your product from the web to avoid any such security issues.
    But yes, if you're putting the published file on a local/network drive, then that security change will need to be applied and, yes, for every computer that accesses the file.
    You definitely want to distribute from an HTTP location.
    I did hope the first part of that article would help. They're not difficult to setup once you find the option. Just highlight some text and right-click to setup the hyperlink...right?

  • Before when I clicked on a hyperlink in a Pages document Pages immediately opened the link.  Now Pages ask if I want to "Edit or Open" the link.  Is this an option that I can turn or off or is this just a change with the latest update?  Thi

    Before when I clicked on a hyperlink in a Pages document Pages immediately opened the link.  Now Pages ask if I want to "Edit or Open" the link.  Is this an option that I can turn or off or is this just a change with the latest update?  This only started in the last six months or so.
    iWorks "09"  Pages ver 5.2

    Use Pages '09 which should still be in your Applications/iWork folder.
    Peter

  • Hyperlink within a page

    Hi,
    How can we do hyperlink within a page as we do in HTML with "name and #".
    Vikas!

    I think Tou are right, You have a point there bro. http://www.prettypartyplace.com/

  • Anyone managed to change default hyperlink colour or to globally change hyperlink colour in Pages????

    Anyone managed to change default hyperlink colour or to globally change hyperlink colour in Pages????
    - Thats all I  want to do, the holy grail of desktop publishing, being able to choose a colour and apply it everywhere, c'mon Apple sort it out, its surely not rocket surgery....

    I figured it out.
    Select one instance of the hyperlink, and define it as a character style in the styles drawer.
    Then create the preferred style you want to use for hyperlinks and save it to character styles.
    You can select every instance of the original link style, and replace with the preferred style.
    Hopefully I've explained this adequately.
    Cheers.

  • How to do hyperlink to html page?

    can i know how to do a hyperlink to html page once i click on a Jbutton? I need a help : )

    You can try something like this:
    String cmd = "c:/program files/ie.exe"; // WHat ever your explorer path is
    String url = "test.html"; // what ever your html path is
          try {
          Runtime.getRuntime().exec(cmd + " \"" + url + "\"");
          } catch (IOException ex) {
    ex.printStackTrace();
          }

Maybe you are looking for