开发者

Object doesn’t support this property or method – Javascript Error

Hello guys I have a nice javascript project to take on. Im starting off trying to toggle some javascript and Im getting an error here:

    function saveComment( id )
{
    $("#commentErrors").css("visibility", "hidden");

    var hashTab = {};
    commentField = document.getElementById("comments-"+id);

    // hard code the constant Node.TEXT_FIELD as its value "3" since
    // IE doesn't support DOM constants correctly
    hashTab["comments"] = commentField.firstChild.nodeType==3
                        ? commentField.innerHTML
                        : commentField.firstChild.value;



    hashTab["id"] = id;
开发者_C百科    //hashTab["entryWorkloadYear"] = document.getElementById("entryWorkloadYear").value;  // Where is this element?!

  ----->>>      WhatIfDataAction.saveComment(hashTab,
            {
                callback:saveCommentCallback,
                timeout:60000,
                errorHandler: dwrSessionErrorHandler
            }
        );
}

any thoughts?

saveComment looks like this:

    public CommentForm saveComment(Map<String,String> properties)
throws Exception
{
EntryBean entry = WhatifCache.fetchEntryFromCache(getSession());
CommentForm form = new CommentForm(properties);
if (form.validate(this))
{
    CommentBean bean = entry.getComment(form.getId());

    bean = CommentBean.deepCopy(bean);

    form.overlayFormData(bean);

    entry.updateComment(bean);
}

return form;

}


The error means that the WhatIfDataAction object does not have a method named saveComment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜