IDCS3 linking in Javascript

Hello all.
I have a very simple JS that I obtained from this forum several years ago. I recently imported it into CS3 and it errs right at the top in this line:
b doc = app.activeDocument;
but I don't find out about it until this line:
b nroflinks = doc.links.length;
where the error message "undefined is not an object" appears at the bottom of the ExtendKit window.
The intervening lines just declare some variables. I have two questions:
1.) Where can I find a well-explained object model since it is no longer documented in the PDF and the object model displayed in the tool kit is next to useless to figure this kind of stuff out? and
2.) How do I get a list of links out of the document?
Thanks for any help you can give...

Hi John,
re: "I stand by my observation that the object model in ESTK is inadequate for learning JS for InDesign."
I agree, but I have to add: the information in the ESTK is pretty much the same as that in the earlier PDFs. Both are generated from InDesign's object model--the main difference is that we fixed errors in the source, rather than fixing them over and over again in the PDF.
Reference documentation is never a good way to learn about an object model--for that, you need tutorials and examples. As I've said in other posts, that's why we did away with the PDF version of the reference--so I could concentrate on the Scripting Guide.
For an HTML version of the reference information, see other threads about Jongware's XSLT converter (which turns the XML used by the ESTK object model viewer into a hyperlinked HTML document).
Thanks,
Ole

Similar Messages

  • Create link using javascript or other relevant automated process

    i have multiple PDF which i have combined using Acrobat pro... the table of content for this pdf does not have link as i had generated it in Word using RD fields. Now, my main concern is it possible to create links using Javascript or any other process.. i am aware of link tool however my document is very huge and the TOC comprises of around 25 pages.. it will be very cumbersome to manually add for each topic and will be difficult to maintain as we keep updating the document content..i would really appreciate if any one could help me in this as i really stuck up in middle of project...

    thanks a ton for your prompt response..As i had mentioned earlier, i have around 13 sub documents. i have generated a table of contents for these document using RD fields in a seperate document and saved it as TOC.doc. As these are fields are referring to topic outside the current document, the links are not availabled in word.. i am not aware of any possible method in word to retrieve links for these topics just like how a standard TOC in word works. as i saw it PRO, there is an option to create link, i was wondering if there is any way i could automatically link these topics as in PDF, the topics are in the same document where as in WORD these are different documents.If you could suggest some work around, i would be glad

  • Open link with javascript via UIButton - Amazon widget

    Hi guys,
    I'd like to offer links to products on Amazon using the Amazon associates program, but all the links require Javascript and I dont really want to add a UIWebView just for this. Is such a thing possible?
    I'm wondering if its possible to open a link via a UIButton like this:
    [[UIApplication sharedApplication] openURL:[[NSURL alloc] initWithString:@"http://www.example.com"]];
    BUT via using an included javascript file, i.e. to make a link like the following but with a UIButton:
    <SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V 20070822/US/imfoip-20/8005/6f95d841-8a9f-4e00-9bbc-db692d4cf04f"> </SCRIPT> <NOSCRIPT>Amazon.com Widgets</NOSCRIPT>
    My favorite hero
    Thanks

    Captivate 8 introduced the common JavaScript API which gets and sets Captivate variables for both SWF and HTML5 output in the same way.  You can read more about that here:
    https://helpx.adobe.com/captivate/using/common-js-interface.html
    Another great thing about Captivate 8, is that they exposed Captivate events to JavaScript.  So, for example, you can listen for when a user submits a quiz question and execute your own JavaScript when that submit event occurs.  Not only can you listen for this event, you also get information sent to you about that event... like what the correct answer was vs. what the student chose.  What I'd recommend is that you subscribe to the following events:
    CPAPI_QUESTIONSUBMIT
    CPAPI_INTERACTIVEITEMSUBMIT
    The event data sent back from the event will give you the information you need.  Download the sample project from the article to find out how to subscribe to these events.

  • Html:link and javascript

    Maybe I'm asking the wrong question, how do you execute JavaScript within a <html:link> tag in Struts. I simply want to execute a collapse / expand divs with an onclick attribute in the <html:link> tag.
    Can this be done with some other tag?
    TC

    and why didnt u try putting the onlick tag ?
    <html:link href=# onClick="myJSfunction()">Rohit</html:link>
    -Rohit

  • Links generate javascript errors?

    I am getting the following error from all links on a .faces page:
    'elements' is null or not an object
    Any idea what can cause this?
    I am btw using:
    myfaces-api 1.1.4-SNAPSHOT
    myfaces-impl 1.1.4-SNAPSHOT
    myfaces-shared-impl 2.0.2-SNAPSHOT
    tomahawk 1.1.3-SNAPSHOT
    tomahawk-sandbox 1.1.2-SNAPSHOT
    Best,
    Thomas.

    Btw, I have a datatable within a tabbedpane. Maybe it is because the form that contains the datatable is within the tabbedpane form?
    The javascript tries to reference the innermost form with a document.forms['something'].elements['something'] statetement, and it fails.

  • Opening an external link using javascript.  Keeping new window in front

    I am displaying a photo from an external link when called upon from my swf.  When the user clicks a button, up pops a corresponding photo in a new browser window.  After the photo window has opened, if the user clicks another button the photo browser will update but its no longer in front.  I know I need to use the focus() command but cannot figure how to incorporate it into my AS3 code.
    var req=new URLRequest();
    function scrollPanePopulate(event:Event){     
         //create the temp variables
         var calledPhoto=pntxml.row[pointindex].PhotoUrl;
         req=pntxml.row[pointindex].PhotoUrl;
         var jscommand:String = "var newwin=window.open('"+req+"','win','height=400,width=600,left=650,top=50,toolbar=no,scrollbars=yes,location=no');";
         var url:URLRequest = new URLRequest("javascript:" + jscommand +"void(0);"); navigateToURL(url, "_self");
    The above code works great but I want to keep the photo window in front when it is refreshed.  Any suggestions?
    thanks in advance...
    -josh

    var req=new URLRequest();
    function scrollPanePopulate(event:Event){    
         //create the temp variables
         var calledPhoto=pntxml.row[pointindex].PhotoUrl;
         req=pntxml.row[pointindex].PhotoUrl;
         var jscommand:String = "var newwin=window.open('"+req+"','win','height=400,width=600,left=650,top=50,toolbar=no,scrollbars=yes,location=no');";
         var url:URLRequest = new URLRequest("javascript:" + jscommand +"void(0);newwin.focus();");
    navigateToURL(url, "_self"); }
    //  p.s.  you should be using externalinterface class.

  • JSP Linking in javascript

    Hi,
    I have downloaded the masthead portal archive and imported it into my NDS. I have added a couple of extra jsps and a javascript file. What I'm trying to do is have a popup window launch from my first jsp to hold my 2nd jsp via javascript. e.g.
    The javascript calls: window.open("FFDialog.jsp","Dialog","width:200px;height:100px;toolbar:no;directories:no;status:no;menubar:no;scrollbars:no;resizable:no;modal:yes");
    The popup opens, but doesn't contain my jsp (which is really just a basic html/js file).
    I think its because my jsp sits under dist->PORTAL-INF->jsp and the javascript under dist->scripts hence FFDialog.jsp isn't in the same location. What needs to be the path in my window.open?
    Cheers!

    Hi Jo,
             In your jsp ,from where you are calling javascript function to call other jsp, write below code
             to get the app path.
    <%String webpath = componentRequest.getWebResourcePath()+"/"; %>
            Now the variable have the root path for your application , So suppose your 2nd jsp page is
    inside a director called jsp so now you use:-
    window.open("<%=webpath%>jsp/FFDialog.jsp", "Dialog","width:200px;height:100px;
    toolbar:no;directories:no;status:no;menubar:no;scrollbars:no;resizable:no;modal:yes");
           Same way if you have your css file inside a directory called css use below code:-
    <LINK href="<%=webpath%>css/style1.css" type=text/css rel=stylesheet>
        Regards,
        Piyush

  • Highlighting the link using javascript:

    Hi
    I am using html:link in submitting the page.when i pressed the html:link the link should be highlighted
    as well as the submission of page should occur.The highlight of the link should go off only when the user chooses(click) the next link.
    can anyone help me how to acheive this using javascript
    thanks in advance

    Sorry, you are at a Java/JSP forum, not at a Javascript forum.
    Besides, your actual problem is normally to be solved using CSS, not using Javascript and certainly not Java/JSP.

  • Random text with links using Javascript?

    I have a very simple script I downloaded that makes text random using javascript. I would like to add a hypertext link on parts of the text, but can't seem to get it to work.
    Would anyone be so kind as to show me how this can be done. I would like to add links to the "Random text string 1.", Random text string 2. etc., within the javascript below.
    <SCRIPT LANGUAGE="Javascript"><!--
    function text() {
    text = new text();
    number = 0;
    // textArray
    text[number++] = "Random text string 1."
    text[number++] = "Random text string 2."
    text[number++] = "Random text string 3."
    text[number++] = "Random text string 4."
    text[number++] = "Random text string 5."
    // keep adding items here...
    increment = Math.floor(Math.random() * number);
    document.write(text[increment]);
    //--></SCRIPT>
    Thank you!

    Hi, Mic,
    I actually don't know if this will work, but what if you added <a href> coding around your text line? You might need \ escape characters so that your script sends it out without trying to execute it as code.
    Z

  • How do I create a HREF link to javascript-created ages?

    Hello,
    I'm not sure where else to turn with this question, so I
    apologize if it's not forum-related.
    I'm using DreamWeaver MX to edit and tweak pages that are
    created with Extensis Portfolio 8 and their NetPublish plug in. I
    am attemping to add a link to my Search, Results and Details pages
    that would open each of these pages in a new window in order to
    make them "printer-friendly" (these pages are currently nested
    within a few frames). The catalog that I've created features
    keyworded photos, and since the users will all get different search
    results based on what they're looking for, the address will always
    vary (especially for the Results page). An example of this address
    would be:
    http://ourwebadress/netpub/server.np?find=&catalog=catalog&site=catalognamehere&template=
    results.np&field=Keywords&op=matches&value=Dallas&value=brownstone&field2=Keywords&op2=
    matches&search=View+Your+Search+Results
    This address shows images based on my search for "Dallas" and
    "brownstone," and because this address would change with every new
    search it's useless as a permanent link.
    My questions is, is there an HREF link command (or perhaps
    something else) that would simply open the existing page in a new
    window, no matter what the page's current HTTP address is? Any
    insight with this would be very appreciated!
    Many Thanks!

    Adobe does NOT make the iPad, Apple does.
    This forum is not for general iPad questions. For that head to the forums at the Apple website: www.apple.com.
    You can download the documentation for your iPad in PDF form at the Apple website, and ask questions there.

  • How do I create a HREF link to javascript-created pages?

    Hello,
    I'm not sure where else to turn with this question, so I
    apologize if it's not forum-related.
    I'm using DreamWeaver MX to edit and tweak pages that are
    created with Extensis Portfolio 8 and their NetPublish plug in. I
    am attemping to add a link to my Search, Results and Details pages
    that would open each of these pages in a new window in order to
    make them "printer-friendly" (these pages are currently nested
    within a few frames). The catalog that I've created features
    keyworded photos, and since the users will all get different search
    results based on what they're looking for, the address will always
    vary (especially for the Results page). An example of this address
    would be:
    http://ourwebadress/netpub/server.np?find=&catalog=catalog&site=catalognamehere&template=
    results.np&field=Keywords&op=matches&value=Dallas&value=brownstone&field2=Keywords&op2=
    matches&search=View+Your+Search+Results
    This address shows images based on my search for "Dallas" and
    "brownstone," and because this address would change with every new
    search it's useless as a permanent link.
    My questions is, is there an HREF link command (or perhaps
    something else) that would simply open the existing page in a new
    window, no matter what the page's current HTTP address is? Any
    insight with this would be very appreciated!
    Many Thanks!

    Thank you.  After renaming the ePub file extension to ZIP, I updated the html files to replace the "http://tel" with "tel", rezipped the files, renamed to ePub -- and this corrected the issue.

  • Broken links and javascript on OMWB page

    Link to "mysql 5 bundle" (http://www.oracle.com/technology/software/tech/migration/workbench/index.html#MySQL5) goes no where (does not scroll down the page).
    Link to section "2.2" also broken. Text is "** For MySQL5 Beta Release see step 2.2" takes you to 404.html
    When i tried to download, page complained that i had not agreed to licence, despite the fact that the "Accept License Agreement" radio button was checked.

    I have updated the page and fixed the navigation links. Thanks for altering us to this.
    The radio license agreement has the "accept" checked by default, you need to click on the "Accept" radio button and will then get a "Thank you..." response. You can then select whatever you want to download.
    Do you know about the new Migration Workbench that currently in Preview release? This support migration from Microsoft SQL Server, Microsoft Access and MySQL. The new Migration Workbench will be an integral part of Oracle SQL Developer and is due for production release soon. For more information see the latest news under SQL Developer on OTN: http://www.oracle.com/technology/products/database/sql_developer/index.html
    Regards
    Sue Harper

  • Trouble opening a link with Javascript

    On this particular site the Log In section calls javascript: show_login_popup[]. This has stopped working, it always used to.
    If it is any consolation it won't work on IE or Google Chrome either.
    I have reinstalled Java and have confirmed that it is working okay.
    I use Kaspersky Internet Security (firewall).
    == URL of affected sites ==
    http://lbc.audioagain.com/

    To avoid confusion: http://kb.mozillazine.org/JavaScript_is_not_Java
    See [[JavaScript]] and http://kb.mozillazine.org/JavaScript
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • IDCS3 linking images setting SNAFU?

    I've got a problem with cloned linked images. Here's the scenario: I open a document and option-click drag on an image to create a copy of that image (I want to use that object's settings in a new image). I go to the Links panel and I relink the new object to my new graphic, except BOTH instances change. This happens in ALL my ID docs, but not my co-workers. I'm trying to set up a grid of different images that all have the same text wraps, etc. and it's getting frustrating to have to create each box from scratch. (I know I can set up a style, but that's not the point.)
    Is there a setting somewhere that I'm not finding that I can turn this off?
    Thanks-

    You have Relink all instances of "xxxxxxx.xxxx" selected in the relink
    dialog box.
    Bob

  • Can I open pdf on the web if the link is javascript:viewpipdf(123.pdf)?

    Example: http://www.tntb.gov.tw/core/eng/endownload.php?page=2
    Question: The above website using javascript for download pdf files, how can i config my adobe reader X / Plugin to open it directly?
    Browser : Mozilla Firefox
    Add-on: download statusbar, IE Tab2
    Plugin: Adobe Acrobat 10.0.1.434
    Thanks a lot!!

    I just tried that and its still not working.
    Thanks for the suggestion though :-)

Maybe you are looking for

  • How to access internal hard drive with screen not working

    Veteran Mac user from Spain, I am a graphic designer and i have a MacBook Pro 17 inch Intel Core 2 Duo 2.4 GHz (Santa Rosa) which i purchased in October of 2007 along with a 23 inch Apple Cinema HD Display Monitor which i have hooked up to my MacBook

  • Macbook Retina 13"- slow drawing?

    Photoshop CS6 Extended 13.0.4 x64 Macbook Pro Retina 13", Intel HD Graphics 4000, Mac OSX 10.8.3 Hello, I installed Photoshop on my brand new Macbook and was surprised at how slow it was with retouching/drawing - eg signing my name with a paintbrush

  • Array to spreadshee​t eol

    I am using array to spreadsheet.  I notice that there is always a eol at the end.  Is there a easy way to get rid of the eol?  Thanks! Kudos and Accepted as Solution are welcome! Solved! Go to Solution.

  • Transport update rules or ODS

    Hi, Do i need to transport update rules or ODS object first Thanks

  • Client 3.1.1.15 hangs on startup for about 30 seconds

    we have upgraded to 3.1.1.15 and when we now launch the client it hangs for about 30 seconds-1 minute after launch, i think that it checking for updates bit failing ?? the server has a perfectly good working network connection anyone else seeing this