I'm using indesign cs6. I want to check whether the selected object present in back side or front side using indesign scripting.
The following code I tried,
This is the code i'm trying it will be return either false value or undefined.
this is bring front Image
this is bring forward Imge
Scripting questions are best asked in the Scripting forum: InDesign Scripting
That said, checking the documentation shows that you are using the function wrong. object.bringToForward() does not return anything useful: Adobe InDesign CS6 (8.0) Object Model JS: SplineItem
If you want to know if a certain object is in front of another, check its z order. Here is a long and fairly complete earlier discussion on it: Re: Getting page items in correct Z-order