Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

<button> tag?

1 view
Skip to first unread message

Fabian Gut

unread,
Apr 12, 2010, 11:41:23 AM4/12/10
to beginn...@perl.org
Hello

How do I create a <button> tag?

print $q->button(); creates an <input type="button".... tag and

print $q->start_button(); gives an error:

Undefined subroutine CGI::start_button

Best regards
Fabian Gut

Bill Stephenson

unread,
Apr 13, 2010, 10:46:46 AM4/13/10
to beginners cgI, Fabian Gut
On Apr 13, 2010, at 1:00 AM, Fabian Gut wrote:

>> Is this what you want?
>>
>> print $Q->submit(-name=>'start_button',
>> -label=>'Start Button');
>
> No, that produces <input type="submit".......>
>
> What I want is something like this:
> <button>foo</button>

I look at the source code for the latest version of CGI.pm and did not
find support for that tag.

You have other options. You can always write your own sub-routine to
create the tags you want, and you can even use a local copy of CGI.pm
and add a subroutine (function) to it so you can use the syntax you
want. It's really pretty easy to do.


Kindest Regards,

--
Bill Stephenson

0 new messages