Hello All,
I need to find a way so that i could identify if a selected pageitem has a hyperlink on it. I have not been able to find a property or method on the pageitem that shows whether it has a hyperlink on it or not.
One possible way i found, was to get the list of hyperlinksources from the document, get their source and match it with the selection but i think there should be a better way as this would require me to look into the list for every single item in the selection. I have been able to do this through C++ sdk, so i suppose there must be a way in javascript for this too.
Kindly point me in the right direction.
Manan Joshi.
Hello Harbs,
Well to explain let me give me a test scenario. Create a rectangle, select it and then using the hyperlink panel create a hyperlink over it.
Now what i want to do is to identify a pageitem that has a hyperlink over it applied this way.
I even saw a class "hyperlinksourcepageitem" in the scripting model what does this represent, could you please explain.
Sorry if its pretty straighforward, actually i am pretty naive in scripting
Manan Joshi
I'm sorry. You're right. I got mixed up between sources and destinations.
Either way, you can only discover hyperlink sources by looping through the document hyperlink sources and comparing them against your object(s).
BTW, I just now noticed that they added a findHyperlinks() method to Text in CS5...
Harbs
Thanks Harbs this is what i was trying to ascertain.
But one query if you could shed some light on, i can do this in C++ without using the document table of hyperlinks using the
"IHyperlinkPageItemData" interface which is present on the pagitem. so i was wodering why this capability has been hidden in scripting dom.
Manan Joshi.
North America
Europe, Middle East and Africa
Asia Pacific