Register

Closed Thread

Junior Member

Join Date: Sep 2008
Posts: 1
 
09-06-2008, 10:47 AM
Angry Spry script error

I am new to spry and am creating a webpage with multiple spry tables on it. I got the first table in and it works fine, but when I went to add the second table I receive this error: I included the portion of the script file that it says is causing the error and have italicized the line where it says the error is occuring.
while executing onClick in InsertSpryDataTable.htm, the following JavaScript error(s) occurred:
At line 1445 of the file "C:\Program Files\Adobe\Adobe Dreamweaver CS3\Configuration\Common\Scripts\spry_ajax_utils.j s": offsetstoNode: Argument number 1 is invalid.

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];
}
var currNode = aDOM.offsetsToNode(origStartOffset,origEndOffset);
if (currNode != null)
{
var aParentNode = currNode;

Thanks in advance for your help.
ssfhlcommish is offline
Senior Member

Join Date: Dec 2007
Posts: 359
 
09-08-2008, 10:52 AM
Default

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;
DanL@Spry is offline
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 09:01 PM. Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 VBulletin Skin by ForumMonkeys.