Dom.getlinefromoffset(), Dom.getlinkhref(), Dom.getlinktarget() – Adobe Dreamweaver API Reference CS5 User Manual
Page 458
453
DREAMWEAVER API REFERENCE
Code
Last updated 8/27/2013
dom.getLineFromOffset()
Availability
Dreamweaver MX.
Description
Finds the line number of a specific character offset in the text (the HTML or JavaScript code) of the file.
Arguments
offset
•
The offset argument is an integer that represents the character location from the beginning of the file.
Returns
An integer that represents the line number in the document.
dom.getLinkHref()
Availability
Dreamweaver 3.
Description
Gets the link that surrounds the current selection. This function is equivalent to looping through the parents and
grandparents of the current node until a link is found and then calling the
getAttribute('HREF')
on the link.
Arguments
None.
Returns
A string that contains the name of the linked file, which is expressed as a file:// URL.
dom.getLinkTarget()
Availability
Dreamweaver 3.
Description
Gets the target of the link that surrounds the current selection. This function is equivalent to looping through the
parents and grandparents of the current node until a link is found and then calling the
getAttribute('TARGET')
function on the link.
Arguments
None.
Returns
A string that contains the value of the
TARGET
attribute for the link or an empty string if no target is specified.