It appears as though you are working with Adobe's Spry AJAX framework (these forums are primarily intended for the discussion of Spry Hosting - unaffiliated with Adobe).
My best recommendation would be to review the
Spry AJAX Framework Documentation and try modifying your code to debug the
origStartOffset variable:
Code:
function ajaxUtils_promptForSpryRegion(codeOffsets)
{
var bAddSpryRegion = false;
var bIsInsideSpryRegion = false;
var aDOM = dw.getDocumentDOM();
if (aDOM)
{
var origStartOffset = -1;
var origEndOffset = -1;
if (codeOffsets)
{
origStartOffset = codeOffsets.startoffset;
origEndOffset = codeOffsets.endoffset;
}
else
{
var selection = aDOM.getSelection();
origStartOffset = selection[0];
origEndOffset = selection[1];
}
// Debugging
alert('origStartOffset value: ' + origStartOffset);
// End Debugging
var currNode = aDOM.offsetsToNode(origStartOffset,origEndOffset);
if (currNode != null)
{
var aParentNode = currNode;