2
* $LynxId: HTML.c,v 1.122 2009/05/25 19:53:35 tom Exp $
2
* $LynxId: HTML.c,v 1.126 2009/05/29 00:24:15 tom Exp $
4
4
* Structured stream to Rich hypertext converter
5
5
* ============================================
4316
4316
I.value_cs = ATTR_CS_IN;
4319
if ((present && present[HTML_BUTTON_TYPE] &&
4320
value[HTML_BUTTON_TYPE]) &&
4321
(!strcasecomp(value[HTML_BUTTON_TYPE], "submit") ||
4322
!strcasecomp(value[HTML_BUTTON_TYPE], "reset"))) {
4324
* It's a button for submitting or resetting a form. - FM
4326
I.type = value[HTML_BUTTON_TYPE];
4320
present[HTML_BUTTON_TYPE] &&
4321
value[HTML_BUTTON_TYPE]) {
4322
if (!strcasecomp(value[HTML_BUTTON_TYPE], "submit") ||
4323
!strcasecomp(value[HTML_BUTTON_TYPE], "reset")) {
4325
* It's a button for submitting or resetting a form. - FM
4327
I.type = value[HTML_BUTTON_TYPE];
4330
* Ugh, it's a button for a script. - FM
4332
I.type = value[HTML_BUTTON_TYPE];
4329
* Ugh, it's a button for a script. - FM
4331
HTML_put_string(me, " [BUTTON] ");
4336
* Make sure we're in a form.
4341
"Bad HTML: BUTTON tag not within FORM tag\n"));
4343
* We'll process it, since the chances of a crash are small,
4344
* and we probably do have a form started. - FM
4335
/* default, if no type given, is a submit button */
4391
4380
* trailing spaces. - FM
4393
4382
LYReduceBlanks(I.value);
4383
} else if (!strcasecomp(I.type, "button")) {
4384
if (!isEmpty(I.name)) {
4385
StrAllocCopy(I.value, I.name);
4387
StrAllocCopy(I.value, "BUTTON");
4396
4391
if (present && present[HTML_BUTTON_DISABLED])
4551
4546
* Ugh, a button for a script.
4553
HTML_put_string(me, "[BUTTON] ");
4548
not_impl = "[BUTTON Input]";
4556
4550
if (not_impl != NULL) {
4557
4551
if (me->inUnderline == FALSE) {
4576
* Check if we're in a form. - FM
4581
"Bad HTML: INPUT tag not within FORM tag\n"));
4583
* We'll process it, since the chances of a crash are small,
4584
* and we probably do have a form started. - FM
4590
4569
CTRACE((tfp, "Ok, we're trying type=[%s]\n", NONNULL(I.type)));