Jump to content

Datapage Status Or Event On Submission


Recommended Posts

Figured this out myself but if anyone is looking to do this, here it is.

 

When a submission datapage is in an error state the pages HTML contains a paragraph <p> with a class attribute of "cbFormError".  All you need to do is search for the existence of this class attribute in the paragraph and you will know whether the previous submit failed or succeeded.  Here's the JavaScript to do that; place it in an HTML Footer:

 

function lookforerror()

}

var v_elements = document.getElementsByTagName("p");

for (var i = 0; i < v_elements.length; i++) {

    if (v_elements.className == "cbFormError") {

        return 1;

    }

    }

    return 0;

    }

 

The function returns 1 if the page is in an error state and 0 if not.

 

Enjoy!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...