// Normalize the urls by converting to lowercase for comparison
if (SelectedFormURL.toLowerCase() == ThisFormURL.toLowerCase())
{
g_objDispatch.OKMessageBox("You must select a valid parent document in order to create a response. You have a response selected.", "Invalid Selection");
// called when user wants to save form data as record
function submitData()
{
if (g_IsLayout)
return false;
var DocumentForm = getDocumentForm();
// Blur all of the elements to check their validation.
for (var i = 0 ; i < DocumentForm.length; i++)
{
DocumentForm.elements[i].fireEvent("onblur");
}
// Check error array to see if there are still uncorrected errors.
for (var i = 0; i < g_arrError.length; i++)
{
if (typeof g_arrError[i] != "undefined")
{
window.setTimeout("g_objDispatch.OKMessageBox('The form values you have entered are not valid. Please correct the error as displayed in the form.', 'Invalid Form Values')", 10);
// had to create internal call so object was not held in case of form reload
function int_addNewOption(i_strSelect)
{
try
{
var strOption = g_objDispatch.AddOptionDialog("Enter the label for the new option:");
var objSelect = eval("getDocumentForm()." + i_strSelect);
if (strOption != null && strOption != "")
insertNewOption(objSelect, strOption);
else
objSelect.selectedIndex = 0;
}
catch (error)
{
var objError = new Error("There was an error adding the custom option to the drop-down list, most likely caused by the form reloading in response to a design change. Please try adding the custom option again.");