JS to check whether a link is within the page or PB

need JS to check whether the link object is it within the page or pasteboard.
Thanks so much. 

Hi Snaf,
Try this below js code, otherwise can you post the snapshot of the problem you face.
var myDoc = app.activeDocument;
for (var i=0; i<myDoc.links.length; i++) {
    var myPage = myDoc.links[i];
    while (myPage){
        if (myPage instanceof Document || myPage instanceof Spread || myPage instanceof Page)
        break;
        myPage= myPage.parent;
    if(myPage.constructor.name=="Spread"){
        alert("Object in Pasteboard");
    else{
        alert("Object in Page");
thx
csm_phil

Similar Messages

  • How to check whether a link is clicked or not in jsp????

    hi
    please help me in checking out whether a link in a html page is clicked or not....
    actually iam having a jsp page which has 3 links
    link1
    link2
    link3
    if i click the link1...the sublinks(for example link 1.1 link 1,2) of link1 should appear...can anyone of u please tell me how to do this in jsp........

    try to use java script

  • How to check whether a file exist in the program folder or not?

    Hi guys,
    how to check whether a file exist in the program folder or not? Let is say i recieve a file name from user then i want to know if the file is there not and act on that base.
    abdul

    Look at the class java.io.File and the .exists() method:
    http://java.sun.com/j2se/1.4/docs/api/java/io/File.html

  • When I click on a link in an email, it does not automatically open the site page? When I receive an email with a link in it, if I click on the link to open the page, nothing happens. It does not open the internet to that page.

    When I click on a link in an email, it does not automatically open the site page?
    When I receive an email with a link in it, if I click on the link to open the page, nothing happens. It does not open the internet to that page.

    I don't appear to have a toolbar either.

  • When I click a link to open the page in new tab, it open the new page beside my page.

    After I update FireFox to version 3.6.8, I could not open the new page in the last tab, it always opens the new page in beside the tab.
    Mmm…I could not make sure the new page or new tab I said is the same with you…?? (I use Chinese version so that I don’t know if it’s the same or not…)
    A window could open several pages with different tabs, and I could click different tab to different page, right?
    If I right clicked a link to open the page to “new tab” in the same window, the new tab opened in the last tab of my window.
    But after I update FireFox to version 3.6.8 and I click a link to open the page to “new tab” in the same windoe, the new tab will open beside my page. (Mmm…Open on right of my page.)
    I would like the “new tab” open to the last tab in my window, not “beside” the tab I used. How could I change the setting??)
    == This happened ==
    Every time Firefox opened
    == After I update FireFox to 3.6.8

    That feature isn't new to 3.6.8, it was changed in 3.6.
    Type '''about:config''' in the URL bar and hit Enter.
    ''If you see the warning, you can confirm that you want to access that page.''
    Filter = '''browser.tabs.insertRelatedAfterCurrent'''
    Double-click that preference to change the value to '''''false'''''

  • Setting "inside" bleed within the page size

    Hello,
    I'm using InDesign CS3 for a book layout and I'm trying to set the inside bleed so that it is 0.25" within the page size (trim size) of 8.5". I've tried putting -0.25" but it only accepts positive numbers.
    The reason I want the bleed within the trim size is so that the ink doesn't interfere with the adhesive when it's bound.
    Thanks for any help.
    Mark

    Expanding on Bob's suggestion, you could put a white rectangle on a top layer and then turn off its visibility. Then you could work away without having to worry about fitting everything to the guide, and just turn on the layer visibility when you've finished to blot out anything that spills over.
    k

  • Why is the link to my form getting this message?  I copied the link right from the page.  An error has occurred. The form does not exist. Please re-enter the web address as the link may be misspelled. [ref: cixTdh4JnkymYgz7awKoQ, BadRequest]

    Why is the link to my form getting this message?  I copied the link right from the page.  An error has occurred. The form does not exist. Please re-enter the web address as the link may be misspelled. [ref: cixTdh4JnkymYgz7awKoQ, BadRequest]

    My form - which was working great - disappeared when I did some editing; here is the message I get now.
    The form does not exist. Please re-enter the web address as the link may be misspelled.
    The link for the form is:
    https://adobeformscentral.com/?f=UqJr%2Aas2RJIHPVA4iGIQ6w
    Please look into the matter and resolve the issue at the earliest.
    Regards,
    Vaibhav Nigam

  • How to get the edit channel link from within the channel?

    Following problem:
    I want to include a link to edit the settings of a channel in the channel contents. The link should be the same as the edit button on the frame of the channel container. Searching through the provider jsps I found that the edit link is created in single.jsp. The code I need seems to boil down to
    <dt:obtainContainer container="$JSPProvider">
      <dtsingle:singleContainerProvider>
      <dtpc:getStringProperty key="editContainerName" id="editContainerName" scope="request"/>
      <dt:getName id="SingleContainer" scope="request"/>
      <jx:declare id="editContainerName" type="java.lang.String"/>
      <jx:declare id="SingleContainer" type="java.lang.String"/>
        <dtsingle:obtainSelectedChannel>
    <A HREF="<dtpc:getDesktopURL/>?action=edit
    &provider=<%=editContainerName%>
    &targetprovider=<dt:getName/>
    &containerName=<%=SingleContainer%>"
    TARGET="_self"> EDIT! </A>
        </dtsingle:obtainSelectedChannel>
      </dtsingle:singleContainerProvider>
    </dt:obtainContainer>However I am unable to get that working in the channel, as I always receive a ProviderException on the line with
    <dt:obtainContainer container="$JSPProvider">
    What am I doing wrong, or is does the obtainContainer simply not work from within a channel?
    If anyone can help me out to get the edit link it would be greatly appreciated. Any hints and/or sample code would help alot.
    thanks!
    Message was edited by:
    obstler42

    Hi Detlev ,
    Thank you very very much . We could figure out how to get the URL and Driver information from there .I have rewarded the points also.
    Thanks
    Ravi
    Message was edited by: Ravi Krishnan

  • When I bring my phone into the store can they check whether it's still under the 1 year warranty or do I have to bring in the reciept?

    My lock button isn't responding when I try to lock my phone and I'm planning on bringing it into the Apple Store tomorrow... but when I go into the store do I need to bring the receipt of when I bought the phone in to the store so they can see when I purchased it ...or do they have a system where they can check whether I've had my phone for less than a year? I can't seem to find my receipt of when I bought it but I know that it's been less than a year since I've had this phone. Going in without the receipt would make my life a lot easier!

    You can check it before you go: https://selfsolve.apple.com/agreementWarrantyDynamic.do
    You do not need the receipt.

  • HT2506 In pages how can I link text within the document? I can find a bookmark option and links only allows me to link to a web page

    Hi all,
    This is my first time using this discussion site! Any help would be great, as I am getting very frustrated with pages!
    What I am trying to do is link text at the bottom of a document to a page at the beginning of the document. I can't find a bookmark option adn when I clink insert link it only provides an options to link to a web page. Help! thanks

    Bookmarks are missing (sadly) and with them, the ability to create an in document link.
    I was looking for this feature in a Table of Contents. When you assign a 'style' to text in a document, you can Insert > Table of Contents. Then Pages will keep the TOC updated and you'll be able to 'link' from the page number in the TOC. (Not much help though, for the OP)

  • How To pass the value within the page using jsp?

    How to passing the textbox value within the jsp page without using javascript or reload the page.
    I have a scenario like this:
    I have a textbox named as "accno" which allow user to key in the accno. After key in the accno, this accno value will used to do a query from database using jstl.
    here is part of my code
    <input name="accno" type="text" onChange="checkLC()"/>
    <sql:query var="results" dataSource="${db}">
    select accno,name from account where accno = '<%=value get from accno textbox%>'          
    </sql:query>
    <c:out value="${result.rows[0].name}"/>
    note that onChange() is the javascript when user key in accno then automatically go to check database then only show out the name. So how can i get the '<%=value get from accno textbox%>' from accno textbox.

    How to passing the textbox value within the jsp page
    without using javascript or reload the page.No, jsp executes on the remoter server, the text box is on a client machine, you need to send information to the server over the network, http does this with a request, which will reload the page.....................

  • How can I post a link so that the page opens in FireFox, bc the target won't work in IE, & I cannot change the default browser at my school.

    I learned about the 'a ref' code to put into a link that makes the new page open in a new tab. Is there a code to add to the start of a link that I post online so that it always opens the new page using FireFox?

    hello sss30813, it's not possiblefor a link in a website to trigger the opening of a site with a certain browser. the only thing i could imagine to work, is when you create a local shortcut on the pcs for firefox (on the desktop for example) with the command line arguments to open a certain page: http://kb.mozillazine.org/Command_line_arguments

  • Link anchor takes the page off center

    I set up my page to be in the center of the browser and when i go to preview and click on the link that is linked to a "link anchor" the entire page moves to the left of the browser placing the anchor at the top corner of the browser. How can i keep the page centered when clicking on the link?

    I'm running Muse v3.2 Build 2 and had just updated some info and re-exported my site, and noticed that the Anchor links have stopped working in Chrome and Safari. When clicked, the page moves sideways in the browser and does not return to the top of the page. It does work correctly in IE and Firefox. One of the affected pages is http://www.i-review.com/implementation.html so when you scroll down and click any of the 'To the top' links, this happens once then nothing. If you go to another page like http://www.i-review.com/training.html it will occur there once too.

  • How to make an anchor link also refresh the page?

    I'm trying some new things with some widgets (compositions) and I'd like to make certain anchor links also refresh my page (on the mobile version of my website). I tried putting the entire link in instead of just selecting my anchor (.com/mypage#myanchor) but that only works the first time (maybe because the user already is on .com/mypage#myanchor ?)
    A bit of Googling found me a way to do this:
    window.location.href = 'mypagetoreload.htm#jumptosection1';
    window.location.reload(true);
    but I don't know how to use this in Muse..
    Thanks in advance!

    Im experimenting with some different versions of a mobile version of my website. In this one I'm trying to put all content (everything except the header and footer) in a composition slideshow. I made the triggers invisible and placed them over my menu buttons in the header, so that the content scrolls horizontally. I like this because people only need to load 1 page (my mobile version only has about 6 pages) and they can also swipe between content, like my product pages.
    This all worked out fine, but now every "page" is the same length (because in reality its just one page with a slideshow on it). So now I had to add content to some pages (like home and about us) to kinda fill all space (the pages with my products on it have alot more content). I decided to put pages together, like put "about us" on the same page as "home". I made an anchor and linked to that anchor with my "about us" menu button. But, as "about us" is on slide 1 with home, the slideshow must also reset when people click it (otherwise you would only scroll down on the wrong slide). If I make my website refresh the slideshow resets (it would also work if i open the link in a new window, but that'd be very annoying).
    English isn't my first language, please excuse my bad grammer.
    Thanks in advance!

  • HT204370 I have a movie that states its downloading when I check it out in purchases within the Store, but it's not downloading, how do I resolve this?

    I have a purchased movie that looks to be perpetually downloading in iTunes account except it isn't. I cannot seem to recommence it's download nor delete it. Any thoughts on how to resolve this would be gratefully received.

    3GS the writing that says iPhone on the back will be silver not grey
    Here's what you do
    1.Make sure your phone is not plugged into the computer.
    2. Put the iPhone into recovery mode (this is NOT DFU mode). Do this by
         a). Hold down both the power/sleep button and the home button until the screen turns black/off
         b). As soon as this happens release the power button but NOT the home button
         c). If done correctly then the Apple logo will appear, KEEP HOLDING THE HOME BUTTON and eventually a connect to itunes graphic will appear. You can release the home button
    3. With the connect to itunes graphic on the screen, plug your phone into the computer. iTunes will start up if it is not already on, and then will say the phone needs restoring. Ignore this and COMPLETELY quit iTunes.
    4. With iTunes off and the graphic still on the phone screen, hold down both the power/sleep and the home button again for 9 seconds (count 100, 200, 300...) or until the screen goes black
    5. When the screen goes black release the home button straight away.
    6. It will start up with the iPhone activation screen ignore this. iTunes should have started up, if not do so. Go to the iPhone tab and either resotre from backup or set up as a new phone.
    You're welcome

Maybe you are looking for