d93220dc80a6f12eb516471427167283b20ccecd angie Wed May 31 14:40:58 2017 -0700 Don't name buttons "submit" when we're going to invoke the function document.formName.submit() because document.formName.submit will point to the button instead of the function. refs #18305 note-47 diff --git src/hg/lib/vcfUi.c src/hg/lib/vcfUi.c index 0ef5dde..fb656be 100644 --- src/hg/lib/vcfUi.c +++ src/hg/lib/vcfUi.c @@ -51,82 +51,82 @@ printf("
" "Haplotype sorting order: using "); char *centerChrom = cartOptionalStringClosestToHome(cart, tdb, parentLevel, "centerVariantChrom"); if (isEmpty(centerChrom)) { // Unspecified in cart -- describe the default action printf(VCF_HAPLOSORT_DEFAULT_DESC " as anchor. |
"); vcfCfgHaplotypeCenterHiddens(track, thisName, thisChrom, thisPos); char label[256]; safef(label, sizeof(label), "Use %s", nameOrDefault(thisName, "this variant")); - cgiMakeButton("submit", label); + cgiMakeButton("setCenterSubmit", label); printf(" as anchor |
To anchor the sorting to a particular variant, " "click on the variant in the genome browser, " "and then click on the 'Use this variant' button on the next page." " |
\n", nameOrDefault(centerName, "variant"), centerChrom, centerPos+1); char label[256]; safef(label, sizeof(label), "Use %s", nameOrDefault(thisName, "this variant")); - cgiMakeButton("submit", label); + cgiMakeButton("replaceCenterSubmit", label); printf(" as anchor |
"); struct dyString *onClick = dyStringNew(0); dyStringPrintf(onClick, "updateOrMakeNamedVariable(%s, '%s.centerVariantChrom', ''); ", formName, track); dyStringPrintf(onClick, "updateOrMakeNamedVariable(%s, '%s.centerVariantName', ''); ", formName, track); dyStringPrintf(onClick, "updateOrMakeNamedVariable(%s, '%s.centerVariantPos', 0);", formName, track); dyStringPrintf(onClick, "document.%s.submit(); return false;", formName); - cgiMakeButtonWithOnClick("submit", "Clear selection", NULL, onClick->string); + cgiMakeButtonWithOnClick("clearCenterSubmit", "Clear selection", NULL, onClick->string); printf(" (use " VCF_HAPLOSORT_DEFAULT_DESC ") |